websperts / tinypng-cli

Handy command line tool for shrinking PNG images using the TinyPNG API
MIT License
242 stars 40 forks source link

Can't find filename with spaces on Windows #23

Open Christopher-Hayes opened 4 years ago

Christopher-Hayes commented 4 years ago

If I try to pass a filename that has a space in it, the script can't find the file No PNG or JPEG images found. This shouldn't happen if I'm putting my filename in quotes, but I'm still getting that error. Even using escape characters like filename\ with\ spaces.jpg doesn't work either.

This is what I've tried

tinypng "filename with spaces.jpg"
tinypng 'filename with spaces.jpg'
tinypng filename\ with\ spaces.jpg

Every time I get the same No PNG or JPEG images found., I was able to fix this by renaming the file to not have spaces. But, it would be nice if I didn't have to do that step.

Specs

Terminal: Git Bash for Windows (mintty 3.1.0 x86_64-pc-msys)

OS: Windows 10

TinyPNG CLI version: v0.0.7