Make some improvements to cargo flow
89892466b599314603fdaabb50e616bf04aafa97
1 parent
42035310
bin/cargo-flow
+1 -1
| 6 | 6 | ||
| 7 | 7 | # Remove the "flow" argument. |
|
| 8 | 8 | shift |
|
| 9 | 9 | ||
| 10 | 10 | # Exec cargo-watch with `flow-once` |
|
| 11 | - | exec cargo watch -qc -i target/* -i errors.err -x 'flow-check' -w "${@:-$PWD}" |
|
| 11 | + | exec cargo watch -qc -i 'target/*' -i errors.err -x "flow-check $@" |
bin/cargo-flow-check
+4 -1
| 1 | 1 | #!/bin/sh |
|
| 2 | 2 | ||
| 3 | + | # Shift process name parameter out. |
|
| 4 | + | shift |
|
| 5 | + | ||
| 3 | 6 | tmpfile=$(mktemp /tmp/cargo-flow.XXXXXX) |
|
| 4 | - | result="$(cargo check --color always --all 2>&1 1>/dev/null)" |
|
| 7 | + | result="$(cargo check --color always --all $@ 2>&1 1>/dev/null)" |
|
| 5 | 8 | ||
| 6 | 9 | if [ "$?" -ne 0 ]; then |
|
| 7 | 10 | # Display the results, but also output them to `errors.err`, which vim |
|
| 8 | 11 | # can read. |
|
| 9 | 12 | echo "$result" | tee errors.err |