-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Spaces in installation path are properly handled by nvm install, but not by nvm use #932
Comments
Check your environment PATH |
Sorry, what exactly should I check? Installing at a path without spaces works like a charm (which I ultimately did). Nevertheless, this should be fixed at some point. |
Having the same issue on Win10 Pro Build 19044, using nvm 1.1.10. Possibly related to #355 ? |
Hi, I've encountered the same issue; solved running cmd as Administrator |
I suggest to fix it by wrapping arguments with an func run(name string, arg ...string) (bool, error) {
c := exec.Command(name, escape(arg)...)
// ... rest of function
}
func escape(args []string) []string {
for index, arg := range args {
if strings.Contains(arg, " ") && !strings.HasPrefix(arg, "\"") {
args[index] = "\"" + arg + "\""
}
}
return args
} As far as I have seen this should work with current usages, but I did not test it. |
Signed-off-by: Harald Fassler <[email protected]>
It turned out, that spaces in the arguments was not the problem. The problem was that |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Issue:
When installing nvm-windows using the nvm-setup.exe to a path with spaces, e.g. "C:\Programs X", the command
nvm install latest
successfully runs.nvm use latest
will return a non-zero exit-code and produce the outputexit status 1: 'C:\Programs' is not recognized as an internal or external command, operable program or batch file.
How To Reproduce:
nvm install latest
(this should work)nvm use latest
Expected Behavior:
nvm selecting the correct version
Screenshots:
Notes: The screenshot is taken from a terminal running MINGW64. The bug is also present in Command Line (Windows 11) and Power Shell.
Desktop:
The text was updated successfully, but these errors were encountered: