avoid special characters like '[', ']' in path to temporary directory#1808
Merged
boegel merged 2 commits intoeasybuilders:developfrom Jun 14, 2016
Merged
avoid special characters like '[', ']' in path to temporary directory#1808boegel merged 2 commits intoeasybuilders:developfrom
boegel merged 2 commits intoeasybuilders:developfrom
Conversation
Member
Author
|
@wpoely86 please review |
This was referenced Jun 13, 2016
| # only common characteris like alphanumeric, '_', '-', '.' and '/' are retained; others are converted to '_' | ||
| special_chars_regex = r'[^\w/.-]' | ||
| if re.search(special_chars_regex, current_tmpdir): | ||
| current_tmpdir = re.sub(special_chars_regex, '_', current_tmpdir) |
Member
There was a problem hiding this comment.
nitpicking but I would convert to X ?
Member
There was a problem hiding this comment.
cause X is just an ordinary letter and _ might be 'special' for some codes.
Member
|
👍 |
Member
Author
|
Thanks for the review @wpoely86! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've run into this a couple of times when submitting array jobs with
ebcommands on our system using Torque, since then you end up in an environment where$TMPDIRis set to something like:Sometimes, this breaks the build/installation for no good reason. I've seen this occur primarily when installing Python packages (it seems like
setuptoolshas trouble with it), and when usingnvccwhich picks up$TMPDIRand uses it as a 'scratch' space, cfr. easybuilders/easybuild-easyblocks#953 (comment)