Skip to content

Commit 6307431

Browse files
committed
Fix tutorial example for how to test with a script.
The script must exit with 0 if there is not problem and non-zero otherwise. Since `grep` exits with 0 if a line matches the pattern we need to negate its exit code.
1 parent 51ae2d9 commit 6307431

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TUTORIAL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ previous interactive session can be hands-free automated with this script:
222222
`foo/test.sh`:
223223
```sh
224224
#!/bin/sh
225-
cargo check 2>&1 | grep E0642
225+
! cargo check 2>&1 | grep E0642
226226
```
227227

228228
And then run:

0 commit comments

Comments
 (0)