How do I know if sips -g failed?

77 views Asked by At

I don't see sips to emit error codes at all:

$ sips main.rb -g all
/Users/nakilon/main.rb
Error: Error querying file

$ echo $?
0

$ sips main.rb -g allasdasda
/Users/nakilon/main.rb
Error: Error querying file

$ echo $?
0

How do I know if it has failed?

1

There are 1 answers

4
Mark Setchell On

sips (as you have tagged it) is a macOS program for processing images at the command-line which is probably not going to want to do much with a Ruby program text/script.

If you really do mean to use sips and with a Ruby file, you need to put the flags before the filename:

sips -g someImage