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

fix(core): handle spaces when launching nxFork #21571

Merged
merged 1 commit into from
Feb 3, 2024

Conversation

Cammisuli
Copy link
Member

@Cammisuli Cammisuli commented Feb 2, 2024

Current Behavior

When trying to call nxFork in a directory that has a space, script interpreters are unable to locate the file because it parses the space as a separate argument

Expected Behavior

We now wrap nxFork arguments that have a space with double quotes on unix, and use the GetShortPathNameW Windows API to get the directory short name in Windows.

The command that gets built for nxFork will look like these:

  • Windows: node C:\dev\triage\TESTSP~1\NODE_M~1\nx\src\TASKS-~1\fork.js \\.\pipe\nx\C:\Users\jon\AppData\Local\Temp\b4f70514e449658222c6\fp11424.sock test:build:production
  • Unix: node "/workspaces/test space/nx" /temp/f11424.sock test:build:production

Related Issue(s)

Fixes #21462

Copy link

vercel bot commented Feb 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Feb 2, 2024 11:14pm

@Cammisuli Cammisuli marked this pull request as ready for review February 2, 2024 23:15
@FrozenPandaz FrozenPandaz merged commit 7623471 into nrwl:master Feb 3, 2024
4 of 6 checks passed
Copy link

github-actions bot commented Feb 9, 2024

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nx run fails with Error: [Cannot find module] when workspaceRoot folder contains space
2 participants