fix argument parsing for test suite

This commit is contained in:
Jonathan Wren 2020-05-23 13:28:15 -07:00
parent b5c671c055
commit 2522582b5d
2 changed files with 14 additions and 6 deletions

View file

@ -166,10 +166,12 @@ def run(context, command, cache_dir=None):
cache_dir = os.path.join("features", "cache", cache_dir)
command = command.format(cache_dir=cache_dir)
args = ushlex(command)[1:]
args = ushlex(command)
try:
cli.run(args or None)
context.exit_status = 0
with patch('sys.argv', args):
cli.run(args[1:])
context.exit_status = 0
except SystemExit as e:
context.exit_status = e.code