From d5d9b894b6ec1175dc2c74c511d96ebf94f9d62c Mon Sep 17 00:00:00 2001 From: Romain Primet Date: Tue, 9 Jan 2018 08:22:38 +0000 Subject: [PATCH] change parameter handling to 'action=append' --- repo2docker/app.py | 2 +- tests/env.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/repo2docker/app.py b/repo2docker/app.py index 380ae56e..b0f32602 100644 --- a/repo2docker/app.py +++ b/repo2docker/app.py @@ -300,7 +300,7 @@ class Repo2Docker(Application): argparser.add_argument( '--env', '-e', dest='environment', - nargs='+', + action='append', help='Environment variables to define at container run time', default=[] ) diff --git a/tests/env.py b/tests/env.py index 21d3f9e0..6700d60b 100644 --- a/tests/env.py +++ b/tests/env.py @@ -16,7 +16,8 @@ def test_env(): subprocess.check_call([ 'repo2docker', '-v', '{}:/home/{}'.format(tmpdir, username), - '-e', 'FOO={}'.format(ts), 'BAR=baz', + '-e', 'FOO={}'.format(ts), + '--env', 'BAR=baz', '--', tmpdir, '/bin/bash',