Closed JesperDramsch closed 1 year ago
Python Version: 3.10.8
Nikola Version: v8.2.3
Operating System: Windows
The Gzip task used shlex to lexically parse input commands from GZIP_COMMAND.
shlex
GZIP_COMMAND
The example is "pigz -k {filename}", however this causes an "error in pigz" because pigz -k outputlatestindex.html does not exist.
"pigz -k {filename}"
pigz -k outputlatestindex.html
This is a know problem of shlex:
https://stackoverflow.com/questions/33560364/python-windows-parsing-command-lines-with-shlex
Change command to
if command: if sys.platform == 'win32': subprocess.check_call(command.format(filename=in_path)) else: subprocess.check_call(shlex.split(command.format(filename=in_path)))
from the StackOverflow, which would be the cleanest option.
Environment
Python Version: 3.10.8
Nikola Version: v8.2.3
Operating System: Windows
Description:
The Gzip task used
shlex
to lexically parse input commands fromGZIP_COMMAND
.The example is
"pigz -k {filename}"
, however this causes an "error in pigz" becausepigz -k outputlatestindex.html
does not exist.This is a know problem of shlex:
https://stackoverflow.com/questions/33560364/python-windows-parsing-command-lines-with-shlex
Proposed solution:
Change command to
from the StackOverflow, which would be the cleanest option.