Proposal: per-task shell/interpreter selection (bash/zsh/pwsh/node) + explicit script mode
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 42/100
調査の方向性
crates/vite_task_plan/src/plan.rs と PR #100 から始めて、既存のフォールバックおよびシェル引数の処理を理解します。MVP は、タスクごとにオプションで指定できるシェルがコマンドを 1 つのスクリプトとして実行し、デフォルトの動作を維持できれば完了です。構文と他のモードとの相互作用については、まだ設計上の決定が必要です。
索引モデルが issue の本文から書いたものです。
説明
Problem
Vite Tasks currently tries to parse commands statically (e.g. && lists) and otherwise falls back to running a shell (/bin/sh -c on Unix or cmd.exe /c on Windows).
However, many real-world tasks need:
- PowerShell on Windows,
- bash-specific features on Unix (vs
/bin/sh), - or explicit “always run as script” mode (never try to split/parse).
Not being able to choose the interpreter makes scripts less portable and pushes authors to wrap everything manually.
Evidence (primary)
- Plan has a hard-coded fallback to
/bin/sh -corcmd.exe /c.
Refs:
- https://github.com/voidzero-dev/vite-task/blob/main/crates/vite_task_plan/src/plan.rs
- PR showing shell-arg handling: https://github.com/voidzero-dev/vite-task/pull/100
Proposed behavior (Unspecified syntax)
Add an optional per-task configuration, e.g.:
shell: "bash -c"orshell: ["powershell.exe","-NoLogo","-Command"]
and/or an execution mode:mode: "auto"(current behavior),mode: "shell"(always run as script via chosen shell),mode: "spawn"(strict direct spawn; fail if not representable)
Use cases
- Windows repos standardizing on PowerShell scripts
- bash-only constructs (process substitution, arrays,
[[ ... ]], etc.) - Avoiding accidental fallback when a task should be strictly spawnable
Backward compatibility
- Default remains current behavior (auto).
- Opt-in only changes behavior for tasks that specify
shell/mode.
Minimal implementation suggestion (MVP)
- Implement
shelloverride for the existing fallback pipeline first:
ifshellis set, run the task command as one script in that shell (no splitting). - Later iterations can decide whether/how to combine with
&&splitting and caching.
- 主要言語
- Rust
- スター
- 466
- フォーク
- 42
- 平均マージ
- 2日 6時間
- マージ済み PR(30日)
- 30
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
voidzero-dev/vite-task のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
voidzero-dev/vite-task#738 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
voidzero-dev/vite-task#719 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
voidzero-dev/vite-task#717 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
voidzero-dev/vite-task#700 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
voidzero-dev/vite-task#699 ·
voidzero-dev/vite-task の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
nautechsystems/nautilus_trader#5095 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
stellar/rs-soroban-env#1739 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
bug good first issue package: quic
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100