a-shell icon indicating copy to clipboard operation
a-shell copied to clipboard

Shortcuts and Shell Command Exit Codes

Open nano9g opened this issue 3 years ago • 11 comments

Currently when I try to run a shell command from Shortcuts using a-Shell, it throws an error if the command's return code is nonzero. Would it be possible to alter this behaviour so that commands such as ping can be used? Here's a simple shortcut to demonstrate the issue - the shortcut stops because ping returns 2 and there's no way around this I can find.

What could be really helpful is to have options that control what the Execute Command action returns - command output, return code, or maybe even both as a dictionary.

Thank you!

(I've attempted to work around this by using Python, Lua, Perl, and wasm but they all failed in different ways… I can provide details if needed.)

nano9g avatar May 27 '21 18:05 nano9g