Skip to content

Open the HTML report without a shell - #4912

Merged
soulgalore merged 1 commit into
sitespeedio:mainfrom
gkirat20:fix-open-path-with-spaces
Oct 23, 2026
Merged

soulgalore merged 1 commit into
sitespeedio:mainfrom
gkirat20:fix-open-path-with-spaces

Conversation

@gkirat20

Copy link
Copy Markdown
Contributor

Use execFileSync with the path as an argument when opening the report with --open, so paths with spaces work and nothing in the path is interpreted by a shell.

Fixes #4911

Tested manually on macOS:
sitespeed.io https://www.sitespeed.io -n 1 --outputFolder "$HOME/my results/test" --open
Before: "The files /Users/kirat/my and /Users/kirat/Desktop/sitespeed.io/results/test/index.html do not exist."
After: the report opens in the browser.

npm test: all tests pass except "cliTests › CLI should silently ignore the removed summary boxes options", which doesn't touch the --open code path (I'm on Node 20, so it may be a version difference). No unit test added, since the change is in the CLI entry script.

This pull request was made with assistance from Claude.

--open built a shell command by joining strings, so it failed when the result path had spaces, and the shell would interpret special characters in the path. Use execFileSync with the path as an argument instead.

Fixes sitespeedio#4911

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@soulgalore
soulgalore merged commit ce37e9a into sitespeedio:main Oct 23, 2026
19 of 20 checks passed
@soulgalore

Copy link
Copy Markdown
Member

Thank you @gkirat20

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.

--open fails when the result path contains spaces

2 participants