-
Notifications
You must be signed in to change notification settings - Fork 503
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
How can I ignore an error in a command? #660
Comments
I think that currently,
Make actually has a feature for this. If you put
It's a bit magical, but I wouldn't be opposed to adding this feature to Just. It would also make a great first issue for anyone interested. |
Similar to `make` if a command is prefixed with `-` then the exit status is ignored. Fix for casey#660
I've taken a stab at implemnting this feature in #687 . |
Similar to `make` if a command is prefixed with `-` then the exit status is ignored. Fix for casey#660
This has been done! Thank you very much, @iwillspeak. I added some documentation in the readme, and cut v0.8.0 that includes the feature. Technically, this is a breaking change, which is why the minor version was bumped to 8, but I don't think it will be a problem in practice, since someone would have to have a recipe line starting with |
There are some commands for which I want to ignore error returns and continue processing. Is there a way to mark a line as ignoring the return value?
This came up with killall which I used to end a process that may or may not be there. The current alternative I have is
killall some_proce || true
, though that seems like a bash thing, not a justfile thing.The text was updated successfully, but these errors were encountered: