Skip to content

Commit

Permalink
Always print NSIS output on errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Nov 8, 2024
1 parent ee89d73 commit bdc0a59
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions constructor/winexe.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,13 @@ def create(info, verbose=False):
args = [MAKENSIS_EXE, verbosity, nsi]
logger.info('Calling: %s', args)
process = run(args, capture_output=True, text=True)
logger.debug("makensis stdout:\n'%s'", process.stdout)
logger.debug("makensis stderr:\n'%s'", process.stderr)
process.check_returncode()
if process.returncode:
logger.info("makensis stdout:\n'%s'", process.stdout)
logger.error("makensis stderr:\n'%s'", process.stderr)
sys.exit(f"Failed to run {args}. Exit code: {process.returncode}.")
else:
logger.debug("makensis stdout:\n'%s'", process.stdout)
logger.debug("makensis stderr:\n'%s'", process.stderr)

if signing_tool:
signing_tool.verify_signature(info['_outpath'])
Expand Down

0 comments on commit bdc0a59

Please sign in to comment.