Skip to content

Commit

Permalink
remove check=True in gita shell subprocss
Browse files Browse the repository at this point in the history
  • Loading branch information
nosarthur committed Aug 1, 2021
1 parent 5568372 commit 82c4fa3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion gita/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,10 @@ def f_shell(args):
chosen[r] = repos[r]
repos = chosen
cmds = ' '.join(args.man[i:]) # join the shell command into a single string
#cmds = args.man[i:]
for name, prop in repos.items():
# TODO: pull this out as a function
got = subprocess.run(cmds, cwd=prop['path'], check=True, shell=True,
got = subprocess.run(cmds, cwd=prop['path'], shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
print(utils.format_output(got.stdout.decode(), name))
Expand Down
2 changes: 1 addition & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def test_shell(mock_run, _, input):
args = ['shell', 'repo7', input]
__main__.main(args)
expected_cmds = input
mock_run.assert_called_once_with(expected_cmds, cwd='path7', check=True, shell=True, stderr=-2, stdout=-1)
mock_run.assert_called_once_with(expected_cmds, cwd='path7', shell=True, stderr=-2, stdout=-1)


class TestContext:
Expand Down

0 comments on commit 82c4fa3

Please sign in to comment.