Commit a866fe1
committed
cli: handle EPIPE for version subcommand
EPIPE handling was added recently via {e}println_nopipe() macros, but
wasn't used for the "version" subcommand. This replaces println()
calls with println_nopipe().
Before:
```
➜ oxide.rs git:(main) ./target/debug/oxide version | head -1
Oxide CLI 0.6.1+20240710.0
➜ oxide.rs git:(main) ./target/debug/oxide version | a
zsh: command not found: a
thread 'tokio-runtime-worker' panicked at library/std/src/io/stdio.rs:1021:9:
failed printing to stdout: Broken pipe (os error 32)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at cli/src/main.rs:105:10:
called `Result::unwrap()` on an `Err` value: JoinError::Panic(Id(9), ...)
➜ oxide.rs git:(main)
```
After:
```
➜ oxide.rs git:(trey/epipe_version) ./target/debug/oxide version | head -1
Oxide CLI 0.6.1+20240710.0
➜ oxide.rs git:(trey/epipe_version) ./target/debug/oxide version | a
zsh: command not found: a
➜ oxide.rs git:(trey/epipe_version)
```
Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>1 parent 9f35461 commit a866fe1
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | | - | |
| 31 | + | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
0 commit comments