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

Fails to install to a path with spaces #21

Closed
koterpillar opened this issue Jun 11, 2024 · 0 comments · Fixed by #22
Closed

Fails to install to a path with spaces #21

koterpillar opened this issue Jun 11, 2024 · 0 comments · Fixed by #22

Comments

@koterpillar
Copy link
Contributor

When the package is added to a project that has spaces in the path, it fails to install:

$ yarn add cloudflared
yarn add v1.22.22
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
error /<snip>/test spaces/node_modules/cloudflared: Command failed.
Exit code: 127
Command: node scripts/postinstall.mjs && node lib/cloudflared.js -v
Arguments: 
Directory: /<snip>/test spaces/node_modules/cloudflared
Output:
Installed cloudflared to /<snip>/test spaces/node_modules/cloudflared/bin/cloudflared
/bin/sh: /<snip>/test: No such file or directory
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

I have traced it to the line:

const sub = spawn(bin, args, { shell: true, stdio: "inherit" });

Is there a reason shell: true is needed there? Works fine without it in my tests.

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

Successfully merging a pull request may close this issue.

1 participant