AmbiguousEnvVar when setting default runner.env with both lower and uppercase
まだ誰も着手していません。
評価
調査の方向性
Reproduce the failure using invoke.yml and tasks.py, or the Python configuration shown, then run the @invoke.task function through ctx.run('env && exit 1'). Trace the environment handling involved in RUN_ENV_NO_PROXY and verify that configuring both uppercase and lowercase variants no longer raises AmbiguousEnvVar while preserving the configured values.
索引モデルが issue の本文から書いたものです。
説明
Hi,
I think I discovered an issue with the environment system, you can't set default environment variables with both upper and lowercase variants, like for HTTP_PROXY:
import invoke
ns = invoke.Collection()
ns.configure(dict(
run=dict(
echo=True,
env={
**{
env_name: "http://my-proxy/"
for env_name in ("http_proxy", "https_proxy", "HTTP_PROXY", "HTTPS_PROXY")
},
**{
env_name: "localhost" for env_name in ("no_proxy", "NO_PROXY")
}
}
)
))
@invoke.task
def test(ctx):
ctx.run('env && exit 1')
ns.add_task(test, "test")
This is also true with the following:
invoke.yml
run: env: HTTP_PROXY: 1 http_proxy: 1tasks.py
import invoke @invoke.task def test(ctx): ctx.run('env && exit 1')
inv test
[..]
invoke.exceptions.AmbiguousEnvVar: Found >1 source for RUN_ENV_NO_PROXY
I guess only keys with the invoke prefix or only external (not set in config) environment variables should be analyzed? RUN_ENV_ subkeys should be analyzed without case modification?
- 主要言語
- Python
- スター
- 4.8k
- フォーク
- 412
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pyinvoke/invoke のほかの issue
-
[Security] Shell injection via Context.cd() path argument — metacharacters not escaped (CWE-78) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
pyinvoke/invoke の issue をすべて見る
似ている issue
-
area: harness bug status: needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Human-Agent-Society/reef#625 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
learningequality/kolibri#15351 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Name consistency オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eellak/triplestore#65 · コメント 1 件 ·