-
Notifications
You must be signed in to change notification settings - Fork 20
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
Input file specification on windows - Backslash #83
Comments
Do you know if absolute paths are accepted on Windows and Mac ? Something like in posix format sharp -i F:/path with spaces/source.jpg -o F:/path with spaces/cache/thumb.jpg |
@regnete Under the hood, @toomanylogins Try quoting the arguments, e.g. |
Thanks for this additional info. I assume that simply replacing
|
Thanks for reply. I am doing as follows on win10 command prompt. No file is output and no error. F:>cd youdocms_source\node F:\youdocms_source\node>node sharp -i "F:/youdocms_source/node/test.jpg" -o "F:/youdocms_source/node/cache/test.jpg" resize 200 200 F:\youdocms_source\node>npm list F:\youdocms_source\node> |
@toomanylogins Exactly. The process should quit with an error code in this case.
|
Makes sense - I'll generalize this and throw an error when there are no input files. |
Description
On a Windows cmd shell the input file (
-i
) cannot be specified with backslash in the path.Reproduction
This command will not create
out.jpg
. It silently fails.sharp -i .\source.jpg -o ./out.jpg resize --width 800 --height 800
This command will create
out.jpg
.sharp -i ./source.jpg -o ./out.jpg resize --width 800 --height 800
Expected behaviour
Command
sharp -i .\source.jpg -o ./out.jpg resize --width 800 --height 800
should createout.jpg
Remarks
-o
) are currently already supported. So it should not be hard to fix this issue.sharp -i .\source.jpg -o ./out.jpg resize --width 800 --height 800
fails I expect it to return an error code. Currently it silently fails.The text was updated successfully, but these errors were encountered: