Document how to ignore errors with - in readme (#690)

This commit is contained in:
Casey Rodarmor 2020-10-03 14:23:51 -07:00 committed by GitHub
parent 9bd0720aa1
commit 30fee97f73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 1 deletions

View File

@ -14,7 +14,7 @@ env:
# Increment to invalidate github actions caches if they become corrupt.
# Errors of the form "can't find crate for `snafu_derive` which `snafu` depends on"
# can usually be fixed by incrementing this value.
CACHE_KEY_PREFIX: 2
CACHE_KEY_PREFIX: 3
jobs:
all:

View File

@ -437,6 +437,26 @@ string!
"
```
=== Ignoring Errors
Normally, if a command returns a nonzero exit status, execution will stop. To
continue execution after a command, even if it fails, prefix the command with
`-`:
```make
foo:
cat foo
echo 'Done!'
```
```sh
$ just foo
cat foo
cat: foo: No such file or directory
echo 'Done!'
Done!
```
=== Functions
Just provides a few built-in functions that might be useful when writing recipes.