Skip to content

Commit de5e8bf

Browse files
committed
Merge -D variables after section parsing
Fixes #52
1 parent 6f47635 commit de5e8bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jinja2cli/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,6 @@ def cli(opts, args):
291291
ext = "jinja2.ext." + ext
292292
extensions.append(ext)
293293

294-
data.update(parse_kv_string(opts.D or []))
295-
296294
# Use only a specific section if needed
297295
if opts.section:
298296
section = opts.section
@@ -302,6 +300,8 @@ def cli(opts, args):
302300
sys.stderr.write("ERROR: unknown section. Exiting.")
303301
return 1
304302

303+
data.update(parse_kv_string(opts.D or []))
304+
305305
if opts.outfile is None:
306306
out = sys.stdout
307307
else:

0 commit comments

Comments
 (0)