Skip to content

Commit

Permalink
Allow underscore in sanitised names
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcbm committed Aug 9, 2016
1 parent ccade80 commit fcd7019
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion manifests/exec.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@


if $sanitise_name {
$sanitised_container = regsubst($container, '[^0-9A-Za-z.\-]', '-', 'G')
$sanitised_container = regsubst($container, '[^0-9A-Za-z.\-_]', '-', 'G')
} else {
$sanitised_container = $container
}
Expand Down
6 changes: 3 additions & 3 deletions manifests/run.pp
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,19 @@
volumes_from => any2array($volumes_from),
})

$sanitised_title = regsubst($title, '[^0-9A-Za-z.\-]', '-', 'G')
$sanitised_title = regsubst($title, '[^0-9A-Za-z.\-_]', '-', 'G')
if empty($depends_array) {
$sanitised_depends_array = []
}
else {
$sanitised_depends_array = regsubst($depends_array, '[^0-9A-Za-z.\-]', '-', 'G')
$sanitised_depends_array = regsubst($depends_array, '[^0-9A-Za-z.\-_]', '-', 'G')
}

if empty($after_array) {
$sanitised_after_array = []
}
else {
$sanitised_after_array = regsubst($after_array, '[^0-9A-Za-z.\-]', '-', 'G')
$sanitised_after_array = regsubst($after_array, '[^0-9A-Za-z.\-_]', '-', 'G')
}

if $restart {
Expand Down

0 comments on commit fcd7019

Please sign in to comment.