activate.fish leaves a literal ^/dev/null entry in PATH
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #427 @r3wretrhy による — マージ済み
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- fish, python
- 領域
- cli, testing-qa
調査の方向性
ACTIVATE_FISH テンプレートと nodeenv.py 内の 2 つ目の fish コマンドを調べます。どちらも ^/dev/null を使用しています。次に tests/test_activate_shells.py を読み、FISH_CARET_REDIRECT の xfail 設定を削除して、@activating_shell を復元します。完了の条件は、両方のリダイレクトが現代的な表記を使用し、完全な PATH アサーションが偽のエントリなしでパスすることです。
索引モデルが issue の本文から書いたものです。
説明
Summary
bin/activate.fish appends a bogus ^/dev/null element to PATH. Every
fish user of nodeenv gets it. The same one-line bug also defeats the stderr
suppression the line was written for.
Reproduction
$ nodeenv --prebuilt /tmp/ne
$ fish -c 'source /tmp/ne/bin/activate.fish; string join \n $PATH | tail -1'
^/dev/null
Observed in CI on ubuntu-latest as a fourth PATH entry resolving to
<cwd>/^/dev/null.
Cause
ACTIVATE_FISH ends its PATH line with a caret redirect:
# The node_modules/.bin path doesn't exists and it will print a warning, and
# that's why we redirect stderr to /dev/null :)
set -gx PATH "$NODE_VIRTUAL_ENV/lib/node_modules/.bin" "$NODE_VIRTUAL_ENV/__BIN_NAME__" $PATH ^/dev/null
fish 3.0 introduced the stderr-nocaret feature flag and ^ stopped being
a stderr redirect; it is now an ordinary character. So ^/dev/null is
parsed as one more argument to set and lands in PATH.
Two consequences, not one:
PATHgains an entry that does not exist.- The warning the redirect was meant to hide now reaches stderr, so the
comment above the line no longer describes what happens.
nodeenv.py uses the same ^/dev/null syntax once more, inside freeze:
set -g NPM_LIST (npm list installed active >/dev/null ^/dev/null | \
cut -d ' ' -f 1 | grep -v npm)
Both should be fixed together. The modern spelling is 2>/dev/null.
Test coverage
tests/test_activate_shells.py (added in #397) marks this
xfail(strict=True) as FISH_CARET_REDIRECT on test_activate_sets_env,
via the path_shell decorator. When the fix lands, drop the constant and the
decorator and put the test back on @activating_shell.
Worth noting how it surfaced: the test originally asserted only the first two
PATH entries, which hid this completely and let CI report green. Widening
it to compare the whole list caught the bug on the first run. A regression
anywhere past index 1 was previously invisible.
- 主要言語
- Python
- スター
- 1.8k
- フォーク
- 225
- 平均マージ
- 17時間 18分
- マージ済み PR(30日)
- 26
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ekalinin/nodeenv のほかの issue
-
README config example breaks when copied into ~/.nodeenvrc対応中かも @jihtsan が 6 日前に担当しました。 オープンdocs
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
activate.fish erases a pre-existing NODE_PATH and never restores it対応中かも @jihtsan が 6 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 50/100
メンテナーはふだん 1 日以内に返信
-
--source: the tmpbin python -> python2 link breaks in several setups対応中かも @jihtsan が 3 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
メンテナーはふだん 1 日以内に返信
-
--source passes --make, --jobs and --load-average to the shell unquoted対応中かも @jihtsan が 6 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
ekalinin/nodeenv の issue をすべて見る
似ている issue
-
`image_generation`: `max_retries` is ignored for OpenAI-compatible providers (always 2 retries)対応中かも @ericz7900 が今日担当しました。 オープンllm translation
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rheeloaded/paperpull#117 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
agenda-tech-brasil/agenda-tech-brasil#1619 · コメント 1 件 ·
-
process
難易度 1/5 1〜3時間 初心者へのやさしさ 76/100
pyrite-wiki/pyrite#1036 ·
メンテナーはふだん 1 日以内に返信