-
Notifications
You must be signed in to change notification settings - Fork 368
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
'opam env' for directories with spaces #5205
'opam env' for directories with spaces #5205
Conversation
24031c9
to
fc9f5fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Err... DOS Command Prompt needs double-quotes. Sending a commit once I've built locally and tested it again. |
All fixed. |
Would it be OK - as with the More importantly, I'd like to double-check the handling if Windows opam is called by another executable for |
But that must be your shell removing the quotes.
That depends on your argument converter. But if you use |
79d2875
to
5875a76
Compare
updated with a test |
5875a76
to
d061435
Compare
The latest commit:
|
tests/reftests/env.test
Outdated
-> installed nv.1 | ||
Done. | ||
# Run eval $(opam env --root='${BASEDIR}/root 2' --switch='${BASEDIR}/switch w spaces') to update the current shell environment | ||
### opam env --sw "./$SW" | grep OPAM_SWITCH_PREFIX | ';' -> ':' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### opam env --sw "./$SW" | grep OPAM_SWITCH_PREFIX | ';' -> ':' | |
### opam env --sw "./$SW" | grep OPAM_SWITCH_PREFIX | ';' -> ':' | '\\_opam\'' -> '/_opam\'' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be handled by test engine, see
Lines 15 to 16 in 35899ba
### opam env | grep "NV_VARS" | ';' -> ':' | |
NV_VARS='${BASEDIR}/OPAM/setenv/doc/nv:${BASEDIR}/OPAM/setenv/share/nv': export NV_VARS: |
It passes windows ci too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, this last test is not required for this PR (no extra escaping done in it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, then I don’t know how to fix this properly
a68229f
to
f57e1b8
Compare
Thanks a lot! |
master_changes.md
file with your changes.Fixes #5204 .
It was not just a Windows problem, although only macOS of the *nix variants commonly uses spaces in their directory names.