-
Notifications
You must be signed in to change notification settings - Fork 756
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ensure shell scripts work on Windows
Our use of `shell-quote` was causing problems on Windows where it was escaping character (such as `@`) by placing a backslash in front. This made Windows think that such path arguments, were at the root. For example, `npm install -D @cloudflare/workers-types` was being converted to `npm install -D \@cloudflare/workers-types`, which resulted in errors like: ``` npm ERR! enoent ENOENT: no such file or directory, open 'D:\@cloudflare\workers-types\package.json' ``` Now we just rely directly on the Node.js `spawn` API to avoid any shell quoting concerns. This has resulted in a slightly less streamlined experience for people writing C3 plugins, but has the benefit that the developer doesn't have to worry about quoting spawn arguments. Closes #4282
- Loading branch information
1 parent
be36619
commit c7d528d
Showing
25 changed files
with
149 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
"create-cloudflare": patch | ||
--- | ||
|
||
fix: ensure shell scripts work on Windows | ||
|
||
Our use of `shell-quote` was causing problems on Windows where it was | ||
escaping character (such as `@`) by placing a backslash in front. | ||
This made Windows think that such path arguments, were at the root. | ||
|
||
For example, `npm install -D @cloudflare/workers-types` was being converted to | ||
`npm install -D \@cloudflare/workers-types`, which resulted in errors like: | ||
|
||
``` | ||
npm ERR! enoent ENOENT: no such file or directory, open 'D:\@cloudflare\workers-types\package.json' | ||
``` | ||
|
||
Now we just rely directly on the Node.js `spawn` API to avoid any shell quoting | ||
concerns. This has resulted in a slightly less streamlined experience for people | ||
writing C3 plugins, but has the benefit that the developer doesn't have to worry | ||
about quoting spawn arguments. | ||
|
||
Closes https://github.com/cloudflare/workers-sdk/issues/4282 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.