Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest version 3.1.9 doesn't seem to properly escape the file paths it sends to the commands #202

Open
henderea opened this issue Feb 2, 2024 · 0 comments

Comments

@henderea
Copy link

henderea commented Feb 2, 2024

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

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant