Subtle bug in parameter handling
The parameter names must not be converted to upper case before calling
context.invoke, because that works with the lowercase names.
Before this bugfix,, we had kw like this in the various setup_* functions:
{'DB_URI': 'sqlite:////tmp/wiki.db', 'db_uri': 'sqlite:////real/path.db'}
and whichever won was pretty much random (dict sort order)
這個提交存在於:
父節點
9d340e0da1
當前提交
644929c4c8
共有 1 個檔案被更改,包括 1 行新增 和 1 行删除
|
|
@ -61,7 +61,7 @@ def prompt_and_invoke(ctx, fn):
|
|||
for p in fn.params:
|
||||
v = click.prompt(p.prompt, p.default, p.hide_input,
|
||||
p.confirmation_prompt, p.type)
|
||||
kw[p.name.upper()] = v
|
||||
kw[p.name] = v
|
||||
|
||||
ctx.invoke(fn, **kw)
|
||||
|
||||
|
|
|
|||
載入中…
新增表格
Add a link
新增問題並參考