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

chore: cli.test.ts may fail on Mac/Windows #1645

Merged

Conversation

aripalo
Copy link
Contributor

@aripalo aripalo commented Nov 19, 2024

When using NodeJS version managers like nvm or fnm, the NodeJS binary location can be a bit "funny".

For example on macOS with fnm, the NodeJS binary path may contain folder Application Support which has a space in it.

Wrapping the process.execPath interpolated value into quotes solves this:

execSync(`"${process.execPath}" ${cli}`, { cwd: fixture });

Fixes #1644.

When using NodeJS version managers like [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm), the NodeJS binary location can be a bit "funny".

For example on macOS with fnm, the NodeJS binary path may contain folder `Application Support` which has a space in it.

Wrapping the process.execPath interpolated value into quotes solves this.
@aripalo aripalo changed the title test: support process.execPath with spaces chore: support process.execPath with spaces Nov 19, 2024
@iliapolo iliapolo changed the title chore: support process.execPath with spaces chore: cli.test.ts may fail on Mac/Windows Nov 25, 2024
@cdklabs-automation cdklabs-automation added this pull request to the merge queue Nov 25, 2024
Merged via the queue into cdklabs:main with commit d684775 Nov 25, 2024
14 checks passed
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 this pull request may close these issues.

cli.test.ts fails if process.execPath contains spaces
3 participants