Cygpath is only required for the PATH variable when using cygwin #42
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.
Addresses #41 by only calling cygpath when processing the
PATH
env var.Checklist
Types of Changes
Proposed Changes
After some more testing I've figured out that we only need to convert to cygpath and use
:
when modifying thePATH
env variable, not any of the other environment variables. https://cygwin.com/cygwin-ug-net/setup-env.html.If you run this in cygwin
It outputs
\\example\a\path;c:\temp;c:\other;\\server\share
which is expected.If you try to do the same for
PATH
, it does not work as expectedOutputs:
'c',
is incorrect and could cause issues. If you reset your bash and run this instead, it works as expected:The previous cygpath commit was applying that fix to all environment variables, but it turns out we only need to apply it to
PATH
. This MR changes hab to only apply cygpath changes for thePATH
environment variable.