util: improve bitcoin-wallet exit codes

This commit is contained in:
MacroFake
2022-09-12 13:11:33 +02:00
parent 5558d2f549
commit fa2b8ae0a2
2 changed files with 13 additions and 8 deletions

View File

@@ -36,7 +36,7 @@ versions = []
for relpath in BINARIES:
abspath = os.path.join(builddir, relpath)
try:
r = subprocess.run([abspath, '--version'], stdout=subprocess.PIPE, universal_newlines=True)
r = subprocess.run([abspath, "--version"], stdout=subprocess.PIPE, check=True, universal_newlines=True)
except IOError:
print(f'{abspath} not found or not an executable', file=sys.stderr)
sys.exit(1)