From 644929c4c836f8b2cb8e38f06c41e4dd9d43142d Mon Sep 17 00:00:00 2001 From: Lars Immisch Date: Thu, 24 Sep 2015 21:49:18 +0200 Subject: [PATCH] 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) --- realms/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/realms/commands.py b/realms/commands.py index 4766b31..c72cbeb 100644 --- a/realms/commands.py +++ b/realms/commands.py @@ -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)