Document cross-platform `FOO=bar cmd` in task commands and scripts
Maintainers usually reply within 1 day
Assessment
This issue has not been assessed yet.
Description
Documentation is
- Missing
Explain in Detail
vp run parses simple commands and && chains itself, including env prefixes like FOO=bar tool --flag. The prefix is applied to the spawned process, so per the source this works on Windows too, without cross-env. (Verified on Linux; Windows read from the code, not tested.)
Other commands (pipes, redirects, $VAR, etc.) fall back to /bin/sh -c, or cmd.exe /d /s /c on Windows, where FOO=bar tool fails.
Neither is documented. command only says "The string is interpreted by a shell", which suggests cmd.exe on Windows.
Source (vite-task 9ba4cc9):
vt_shell: parsesFOO=BAR program argsvt_planplan.rs: applies prefix envs per&&itemplan.rs: shell fallback
Is this a supported feature? If so, it'd be a good reason to drop cross-env.
Your Suggestion for Changes
In Compound Commands or command, document:
- Which commands are parsed by Vite Task, and which fall back to the system shell (and which shell on Windows).
FOO=bar toolworks on every OS when parsed, and applies only to that command (FOO=1 a && bdoesn't setFOOforb).
Relevant Page
https://github.com/voidzero-dev/vite-plus/blob/main/docs/config/run.md#command
- Dominant language
- Rust
- Stars
- 6.3k
- Forks
- 283
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 214
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from voidzero-dev/vite-plus
-
pending triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
voidzero-dev/vite-plus#2882 · 2 comments ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
voidzero-dev/vite-plus#2097 · 10 comments · 2 reactions ·
Maintainers usually reply within 1 day
-
defineConfig drops own properties of Promise plugins (breaks Vike discovery)Possibly taken @liangmiQwQ claimed this today. Openbug
voidzero-dev/vite-plus#3152 · 1 assignee ·
Maintainers usually reply within 1 day
-
vpx: watch reports for `vpx --watch`, and `vpx watch` on oxc-node's watcherPossibly taken @fengmk2 claimed this 1 day ago. Open
voidzero-dev/vite-plus#3141 · 1 reaction · 1 assignee ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
voidzero-dev/vite-plus#3137 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
All issues in voidzero-dev/vite-plus
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
chrisdickinson/trivia#26 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100