CommandLine.template accepts NAME+=value as the program name

オープン
#9,862 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
cli

調査の方向性

Start by reading CommandLine.template and its existing syntax tests, then check how ChildProcess.make uses the parsed template. Add coverage for NAME+=value in the program position and confirm it is rejected as an assignment requiring a shell. The issue author says they already have a fix and plan to open a PR, so check the issue for that work before starting.

索引モデルが issue の本文から書いたものです。

説明

CommandLine.template rejects a variable assignment in the program position, but only the NAME=value form. The append form NAME+=value, which bash and zsh (and macOS sh) also read as an assignment, is accepted and becomes the program name:

import { CommandLine } from "effect/process"

CommandLine.template`FOO=bar make`
// Failure: UnsupportedSyntax "A variable assignment needs a shell"

CommandLine.template`FOO+=bar make`
// Success: ["FOO+=bar", "make"]

In bash or zsh, FOO+=bar make runs make with FOO set. ChildProcess.make splits its template with CommandLine.template, so ChildProcess.make`FOO+=bar make` tries to run a program named FOO+=bar instead.

On v4/next-minor (unreleased, added in #9752). I have a small fix with a test and will open a PR.

主要言語
TypeScript
スター
16.7k
フォーク
808
平均マージ
11時間 29分
マージ済み PR(30日)
837

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Effect-TS/effect のほかの issue

Effect-TS/effect の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。