Try to run imageoptim on a path containing a space.
Expected Behaviour
It runs the task normally.
Actual Behaviour
It gives errors about not being able to open/copy/whatever the file paths, and can even sometimes create folders in the current working directory
Version Numbers or N/A
macOS: 12.7.3
/Applications/ImageOptim.app: 1.9.3
/Applications/ImageAlpha.app: 1.5.1
/Applications/JPEGmini.app: N/A
imageoptim-cli: 3.1.9 (3.1.7 works fine)
Help Needed
I think this bug is related to the change in 3.1.9 that moves it away from using execa to run the various operations. Version 3.1.7 works fine with filepaths that have spaces in them, so something in the 3.1.9 release broke that. It may be necessary to change the method being used from child_process or possibly do some escaping before passing things in. I'm not 100% sure what part of the 3.1.9 changes broke this.
Steps To Reproduce The Error
Try to run
imageoptim
on a path containing a space.Expected Behaviour
It runs the task normally.
Actual Behaviour
It gives errors about not being able to open/copy/whatever the file paths, and can even sometimes create folders in the current working directory
Version Numbers or N/A
imageoptim-cli
: 3.1.9 (3.1.7 works fine)Help Needed
I think this bug is related to the change in 3.1.9 that moves it away from using
execa
to run the various operations. Version 3.1.7 works fine with filepaths that have spaces in them, so something in the 3.1.9 release broke that. It may be necessary to change the method being used fromchild_process
or possibly do some escaping before passing things in. I'm not 100% sure what part of the 3.1.9 changes broke this.