We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66c9995 commit c8c6241Copy full SHA for c8c6241
stdlib-candidate/std-rfc/pipefail/mod.nu
@@ -0,0 +1,16 @@
1
+export alias default-run-external = run-external
2
+
3
+export def --wrapped run-external [...rest: string] {
4
+ let results = default-run-external ($rest | first) ...($rest | skip 1) | complete
5
+ if $results.exit_code != 0 {
6
+ error make {
7
+ msg: "External command failed"
8
+ label: {
9
+ text: "command had a non-zero exit code",
10
+ span: (metadata $rest).span
11
+ }
12
13
+ } else {
14
+ $results.stdout
15
16
+}
0 commit comments