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

CHORE: use a parser instead of splitting command strings by space #4079

Closed
RamIdeas opened this issue Oct 1, 2023 · 0 comments · Fixed by #4080
Closed

CHORE: use a parser instead of splitting command strings by space #4079

RamIdeas opened this issue Oct 1, 2023 · 0 comments · Fixed by #4080
Assignees
Labels
c3 Relating to C3 (create-cloudflare) package enhancement New feature or request wrangler Relating to the Wrangler CLI tool

Comments

@RamIdeas
Copy link
Contributor

RamIdeas commented Oct 1, 2023

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-quote

@RamIdeas RamIdeas added the enhancement New feature or request label Oct 1, 2023
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Oct 1, 2023
@RamIdeas RamIdeas added c3 Relating to C3 (create-cloudflare) package wrangler Relating to the Wrangler CLI tool labels Oct 1, 2023
@RamIdeas RamIdeas self-assigned this Oct 1, 2023
@RamIdeas RamIdeas mentioned this issue Oct 1, 2023
2 tasks
@github-project-automation github-project-automation bot moved this from Untriaged to Done in workers-sdk Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c3 Relating to C3 (create-cloudflare) package enhancement New feature or request wrangler Relating to the Wrangler CLI tool
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant