Skip to content
Snippets Groups Projects

force `subprocess.run` to check return code is 0

Merged Hans Fangohr requested to merge force-checking-of-error-code into linux-debian11
1 file
+ 3
1
Compare changes
  • Side-by-side
  • Inline
+ 3
1
@@ -38,7 +38,9 @@ def create_mock_git_repository(target_directory, create_directory=True):
@@ -38,7 +38,9 @@ def create_mock_git_repository(target_directory, create_directory=True):
# that.
# that.
user_details = "-c user.name='Tes Ta' -c user.email='tester@some-ci.org'"
user_details = "-c user.name='Tes Ta' -c user.email='tester@some-ci.org'"
subprocess.run(
subprocess.run(
f'git {user_details} commit -m "first commit" readme.txt', shell=True, check=True
f'git {user_details} commit -m "first commit" readme.txt',
 
shell=True,
 
check=True,
)
)
Loading