未验证 提交 c6f83e47 编写于 作者: F Frost Ming

Don't pass the help argument into the run script method

Fix #272
上级 df4a35f8
Don't pass the help argument into the run script method.
......@@ -113,6 +113,7 @@ class Command(BaseCommand):
) -> None:
script = project.scripts[script_name]
kind, value, options = self._normalize_script(script)
options.pop("help", None)
if kind == "cmd":
args = shlex.split(value) + list(args)
elif kind == "shell":
......
......@@ -45,7 +45,10 @@ def test_run_cmd_script(project, invoke):
def test_run_shell_script(project, invoke):
project.tool_settings["scripts"] = {
"test_script": {"shell": "echo hello > output.txt"}
"test_script": {
"shell": "echo hello > output.txt",
"help": "test it won't fail",
}
}
project.write_pyproject()
with cd(project.root):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册