StaticSite and SsrSite: Fixes issues #3344
See issue #3344 for details
After doing quite a bit of digging, I was able to determine that the root cause is because child_process.exec() (and, by extension, execSync()) does not support spaces in the command path. You can read all about it on this NodeJS issue from 2016: https://github.com/nodejs/node/issues/6803
Based on the comments from the NodeJS issue, the proper solution is to escape (not encode) the path with spaces. On MacOS, this can be done by doing \\ , which is not cross-system compatible, but wrapping the path in " " is indeed supported on all operating systems.
So this PR is doing just that: wrapping the script and zipPath values in double quotes.
I checked for other instances of execSync in the code, but all the others appeared safe. These seem to be the only ones that failed because they reference an external script (support/base-site-archiver.mjs) using an absolute path.
🦋 Changeset detected
Latest commit: c9cee9e2b114a29daf8e4c695e30e59c65f394b4
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 6 packages
| Name | Type |
|---|---|
| sst | Minor |
| @sst/console | Minor |
| create-sst | Minor |
| astro-sst | Minor |
| svelte-kit-sst | Minor |
| solid-start-sst | Minor |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR