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)
This commit is contained in:
Lars Immisch 2015-09-24 21:49:18 +02:00
parent 9d340e0da1
commit 644929c4c8

View file

@ -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)