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

scoop bash shim broken if Windows username contains spaces #3878

Closed
shenker opened this issue Mar 13, 2020 · 1 comment
Closed

scoop bash shim broken if Windows username contains spaces #3878

shenker opened this issue Mar 13, 2020 · 1 comment

Comments

@shenker
Copy link

shenker commented Mar 13, 2020

My Windows home directory contains a space, C:\Users\Firstname Lastname. When I try to run scoop in Git Bash, I get:

C:\Users\Firstname: The term 'C:\Users\Firstname' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

In ~/scoop/shims/scoop I have:

#!/bin/sh
powershell.exe -noprofile -ex unrestricted "C:\Users\Firstname Lastname\scoop\apps\scoop\current\bin\scoop.ps1"  "$@"

If I change the double quotes to single quotes and add a backtick to escape the space, it works:

#!/bin/sh
powershell.exe -noprofile -ex unrestricted 'C:\Users\Firstname` Lastname\scoop\apps\scoop\current\bin\scoop.ps1'  "$@"

Note that this does not fix handling of paths containing spaces in arguments to scoop, which is broken even in powershell (see #3561).

@jontaylor224
Copy link

I am also having this same issue because my user home directory contains a space

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants