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 Chrome paths with spaces #770

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

neeeeecka
Copy link

@neeeeecka neeeeecka commented Oct 12, 2023

The issue:

On MacOs the Chrome would not start, shell command ran but exited:
image

The reason:

The backslashes in - /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome are not interpreted as literal characters by JS, but rather ignored and the resulting JS string was: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome.

Fix:

To resolve this, we need to escape whitespaces as we would escape them in a shell command, by wrapping it in double quotes:
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

Related: nodejs/node#7367 (comment)

Tested on:
MacOS: 13.2.1
NodeJS: v14.21.3

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.

None yet

2 participants