Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker::run turns underscores in the $title and $depends_array variables into dashes #338

Open
lorijean44 opened this issue Aug 28, 2015 · 0 comments
Labels

Comments

@lorijean44
Copy link

The docker::run type tries to sanitize the title and the depends variables. One of the things that gets sanitized is underscores. I ended up modifying it to not do this, as I saw no issues using underscores at all.

Here's a diff:

-  $sanitised_title = regsubst($title, '[^0-9A-Za-z.\-]', '-', 'G')
-  $sanitised_depends_array = regsubst($depends_array, '[^0-9A-Za-z.\-]', '-', 'G')
+## Turn anything that is not a Number, letter, dash, or underscore into a dash
+  $sanitised_title = regsubst($title, '[^0-9A-Za-z.\-_]', '-', 'G')
+  $sanitised_depends_array = regsubst($depends_array, '[^0-9A-Za-z.\-_]', '-', 'G')

To be fair, I did not adequately test the depends array having underscores.

garethr added a commit that referenced this issue Jan 7, 2017
feature/#338 - Allow underscore in sanitised names
cegeka-jenkins pushed a commit to cegeka/puppet-docker that referenced this issue Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants