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

[Bug] Shims fail if path contains spaces #4728

Closed
jbtls opened this issue Feb 10, 2022 · 25 comments · May be fixed by #4767
Closed

[Bug] Shims fail if path contains spaces #4728

jbtls opened this issue Feb 10, 2022 · 25 comments · May be fixed by #4767

Comments

@jbtls
Copy link

jbtls commented Feb 10, 2022

Bug Report

git

Current Behaviour

Scoop is unable to run command: "Could not create process with command <...>"

Expected Behaviour

Scoop should update

Additional context/output

My username has a space in between.

Possible Solution

The git shim should be updated to:
path = "C:\Users\User Name\scoop\apps\git\current\cmd\git.exe"

System details

Windows version: 11

OS architecture: 64bit

**PowerShell version:**5.1.22000.282

Scoop Configuration

{
    "lastupdate":  "2022-01-27T14:48:14.5181152+01:00",
    "SCOOP_REPO":  "https://github.com/lukesampson/scoop",
    "SCOOP_BRANCH":  "master"
}
@jbtls jbtls added the bug label Feb 10, 2022
@rashil2000 rashil2000 transferred this issue from ScoopInstaller/Main Feb 10, 2022
@niheaven
Copy link
Member

What if you change scoop to 'develop'?

scoop config SCOOP_BRANCH develop
scoop update
scoop reset git

@jbtls
Copy link
Author

jbtls commented Feb 11, 2022

Same problem. I've just changed the shim myself and it works with the solution given above.

Possible Solution

The git shim should be updated to:
path = "C:\Users\User Name\scoop\apps\git\current\cmd\git.exe"

@niheaven
Copy link
Member

Have you tested path = "C:\Users\User Name\scoop\apps\git\current\cmd\git.exe"? If so, I'll fix it. Sorry for not having suitable environment to test myself.

@jbtls
Copy link
Author

jbtls commented Feb 11, 2022

Yes, and it works! I've just realized that this problem affects multiple shims (yt-dlp, ffmpeg, ...). It should get fixed there too.

@rashil2000
Copy link
Member

I'm not able to reproduce this issue. My .shim files have paths with spaces and don't require double quotes.

Can you try these step:

scoop config shim kiennq
scoop update
scoop reset git

@niheaven
Copy link
Member

Maybe it's the bug of default shimexe? If so, it should be fixed.

@rashil2000
Copy link
Member

Maybe it's the bug of default shimexe? If so, it should be fixed.

We changed the default shim to kiennq some months ago, so that's not likely.

@rashil2000 rashil2000 changed the title Scoop update not possible [Bug] Shims fail if path contains spaces Feb 13, 2022
@jbtls
Copy link
Author

jbtls commented Feb 18, 2022

Hey, sorry for not answering fast.
For me, it seems like it has happened to all shims….

@JcobCN
Copy link

JcobCN commented Feb 19, 2022

i got the same problem, that may be related to python env.
I have installed Anaconda, and conda command get the same problem "failed to create process".
Does scoop used python?

@JcobCN
Copy link

JcobCN commented Feb 19, 2022

scoop config SCOOP_BRANCH fix-shim
scoop update
scoop reset git
git works well, and need reset all apps.

@rashil2000
Copy link
Member

rashil2000 commented Feb 19, 2022

Does scoop used python?

It doesn't.

Does your username contain special/accented characters?

@JcobCN
Copy link

JcobCN commented Feb 19, 2022

Yes, I modified Scoop installed path at "D:\Program Files\Scoop", so shim path contain spaces character.

OS: windows 10

@JcobCN
Copy link

JcobCN commented Feb 19, 2022

Yes, I modified Scoop installed path at "D:\Program Files\Scoop", so shim path contain spaces character.

OS: windows 10

Before today, Scoop works well.

@rashil2000
Copy link
Member

Here's my environment:

image

Can you try using the develop branch once?

scoop config SCOOP_BRANCH develop
scoop update
scoop reset git

@JcobCN
Copy link

JcobCN commented Feb 20, 2022

Here's my environment:

image

Can you try using the develop branch once?

scoop config SCOOP_BRANCH develop
scoop update
scoop reset git

using the develop, but does not work.
image

@JcobCN
Copy link

JcobCN commented Feb 20, 2022

@jbehmel Have you installed MSVC build tools recently?

@JcobCN
Copy link

JcobCN commented Feb 20, 2022

@rashil2000 I think some windows setting changed, My app, windows Terminal, has the same problem, must add " in the path.
image

Before install MSVC Buildtools, it works well, Scoop works well, and Anaconda works well.
MSVC Buildtools change some OS setting?

@rashil2000
Copy link
Member

I also have MSVC build tools installed, since a long time now.

@rashil2000
Copy link
Member

For Windows Terminal you will need double quotes because it's json and the binary path has spaces.

@JcobCN
Copy link

JcobCN commented Feb 20, 2022

For Windows Terminal you will need double quotes because it's json and the binary path has spaces.

before that, my setting is
image
and work well.

and now, my setting need add quotes to contain the spaces path.
image

@rashil2000
Copy link
Member

Could you try uninstalling MSVC tools to confirm if that is causing this problem?

@niheaven
Copy link
Member

If adding quotes doesn't introduce a new bug, #4734 could be merged.

@rashil2000
Copy link
Member

Could you try uninstalling MSVC tools to confirm if that is causing this problem?

@JcobCN any updates on this?

@vieiraa
Copy link

vieiraa commented Feb 28, 2022

Fixed by #4767.
Will need to run

scoop reset *

to use the fixed shim.exe.

@rashil2000
Copy link
Member

Closed in #4734

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

Successfully merging a pull request may close this issue.

5 participants