mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
ePub: quote the command only on Windows.
This commit is contained in:
parent
4dcf3d56c2
commit
6a99e88565
@ -46,7 +46,13 @@ if __name__ == '__main__':
|
||||
print('Command to execute:')
|
||||
print(command)
|
||||
|
||||
if os.system('"' + command + '"') != 0:
|
||||
quoted_command = command
|
||||
if os.name == 'nt':
|
||||
# On Windows, it is typical to have spaces in folder names, and that requires to wrap the whole command
|
||||
# in quotes. On Linux, this might create errors when starting the command.
|
||||
quoted_command = '"' + command + '"'
|
||||
|
||||
if os.system(quoted_command) != 0:
|
||||
print('docbook2epub fails')
|
||||
shutil.rmtree(output_dir, ignore_errors=True)
|
||||
sys.exit(1)
|
||||
|
Loading…
Reference in New Issue
Block a user