Skip to content

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

@henderea

Description

@henderea

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions