svgo *.svg doesn't work

Created on 17 Feb 2019  路  5Comments  路  Source: svg/svgo

Hello!
I can't understand why svgo *.svg doesn't work for me.
svgo image.svg works, but svgo *.svg doesn't.
It gives an error no such file or directory ...

Most helpful comment

Use Git Bash on Windows.

All 5 comments

I'm afraid that's Windows issue. Usually shell passes all svg filenames.

Use Git Bash on Windows.

@grig0ry git bash works, thank you!

I'm seeing this issue on a Mac using SVGO in conjunction with lint-staged.

Not yarn svgo *.svg --pretty --config=svgo.config.format.json
nor svgo *.svg
nor yarn svgo *.svg

Error: Error: no such file or directory '*.svg'.

Looks like on v10 of lint-staged you'll just wanna do:

"**/*.svg": [
  "svgo"
]

(plus whatever flags, but no file or folder targeting)

Was this page helpful?
0 / 5 - 0 ratings