mirror of
https://gitlab.com/openlp/packaging.git
synced 2024-12-22 13:02:50 +00:00
Make provision for Microsoft's exceptional wisdom in making an exit code of 1 be a success
This commit is contained in:
parent
71f000a5c8
commit
0a2a90794e
@ -84,7 +84,7 @@ class Builder(object):
|
||||
if self.args.verbose:
|
||||
self._print(text, *args)
|
||||
|
||||
def _run_command(self, cmd, err_msg):
|
||||
def _run_command(self, cmd, err_msg, exit_code=0):
|
||||
"""
|
||||
Run command in subprocess and print error message in case of Exception.
|
||||
|
||||
@ -93,7 +93,7 @@ class Builder(object):
|
||||
proc = Popen(cmd, stdout=PIPE, stderr=PIPE, universal_newlines=True)
|
||||
output, error = proc.communicate()
|
||||
code = proc.wait()
|
||||
if code != 0:
|
||||
if code != exit_code:
|
||||
self._print(output)
|
||||
self._print(error)
|
||||
raise Exception(err_msg)
|
||||
|
@ -320,7 +320,7 @@ class WindowsBuilder(Builder):
|
||||
"""
|
||||
self._print('Running HTML Help Workshop...')
|
||||
os.chdir(os.path.join(self.manual_build_path, 'htmlhelp'))
|
||||
self._run_command([self.htmlhelp_exe, 'OpenLP.chm'], 'Error running HTML Help Workshop')
|
||||
self._run_command([self.htmlhelp_exe, 'OpenLP.chm'], 'Error running HTML Help Workshop', exit_code=1)
|
||||
|
||||
def build_package(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user