aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@kernel.org>2019-10-10 10:20:47 -0700
committerAndy Lutomirski <luto@kernel.org>2019-10-10 10:20:47 -0700
commitc6c61c5c68e38d3d8163cb035052e0dff2906ed7 (patch)
tree473ed46795e8efbe11d3ff8cf7d322e4f07be7e0
parent05f7c222ba66cff260e641b6b03312712f992e58 (diff)
downloadvirtme-c6c61c5c68e38d3d8163cb035052e0dff2906ed7.tar.gz
Verify that --pwd and --cwd are not both set
Signed-off-by: Andy Lutomirski <luto@kernel.org>
-rw-r--r--virtme/commands/run.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/virtme/commands/run.py b/virtme/commands/run.py
index ce00154..78782ca 100644
--- a/virtme/commands/run.py
+++ b/virtme/commands/run.py
@@ -492,7 +492,9 @@ def do_it() -> int:
return 1
kernelargs.append('virtme_chdir=%s' % rel_pwd)
- if args.cwd:
+ if args.cwd is not None:
+ if args.pwd:
+ arg_fail('--pwd and --cwd are mutually exclusive')
rel_cwd = os.path.relpath(args.cwd, args.root)
if rel_cwd.startswith('..'):
print('specified working directory is not contained in the root')