CHORE: use a parser instead of splitting command strings by space #4079
Labels
c3
Relating to C3 (create-cloudflare) package
enhancement
New feature or request
wrangler
Relating to the Wrangler CLI tool
In the absence of a shell command parser, we split strings by space (
cmd.split(" ")
) in a few places (mainly, in create-cloudflare but also in wrangler too).We primarily do this for the DX of writing command strings vs manually writing an array of arguments. The intention is to fallback to writing an array when one of the arguments includes a space itself but the developer has to know/remember this – it is easy to miss/forget and has bitten us in the past.
Instead, we should replace these with
shell-quote/parse
https://www.npmjs.com/package/shell-quoteThe text was updated successfully, but these errors were encountered: