You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blog/2024-09-17-nushell_0_98_0.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,20 +12,6 @@ Nushell, or Nu for short, is a new shell that takes a modern, structured approac
12
12
13
13
Today, we're releasing version 0.98.0 of Nu. This release changes non-zero exit codes from external commands to be handled as errors, makes the IR evaluator the default, removes support for the system clipboard, and includes many command changes and bugfixes.
14
14
15
-
::: warning New error behavior
16
-
This release adds a new error when an [external exits with a non-zero exit code](#non-zero-exit-codes-are-now-errors-toc). In the default config, this error is suppressed in the REPL. However, **if you are upgrading with an existing config, you must add this section to your $env.config to suppress this error**:
17
-
18
-
```
19
-
display_errors: {
20
-
exit_code: false
21
-
# Core dump errors are always printed, and SIGPIPE never triggers an error.
22
-
# The setting below controls message printing for termination by all other signals.
23
-
termination_signal: true
24
-
}
25
-
```
26
-
27
-
:::
28
-
29
15
# Where to get it
30
16
31
17
Nu 0.98.0 is available as [pre-built binaries](https://github.com/nushell/nushell/releases/tag/0.98.0) or from [crates.io](https://crates.io/crates/nu). If you have Rust installed you can install it using `cargo install nu`.
@@ -81,6 +67,20 @@ As part of this release, we also publish a set of optional plugins you can insta
81
67
See a full overview of the [breaking changes](#all-breaking-changes-toc)
82
68
:::
83
69
70
+
::: warning New error behavior
71
+
This release adds a new error when an [external exits with a non-zero exit code](#non-zero-exit-codes-are-now-errors-toc). In the default config, this error is suppressed in the REPL. However, **if you are upgrading with an existing config, you must add this section to your $env.config to suppress this error**:
72
+
73
+
```
74
+
display_errors: {
75
+
exit_code: false
76
+
# Core dump errors are always printed, and SIGPIPE never triggers an error.
77
+
# The setting below controls message printing for termination by all other signals.
78
+
termination_signal: true
79
+
}
80
+
```
81
+
82
+
:::
83
+
84
84
One long-requested feature for nushell is to make non-zero exit codes throw an error. Before this release, non-zero exit codes would quietly stop execution. In some cases, execution would not even stop, but rather only skip over the remaining commands in the current code block. With this release, non-zero exit codes (and termination due to unix signals) are now errors just like any other error, so nushell now runs almost as if bash's `set -e` option was enabled ([#13515](https://github.com/nushell/nushell/pull/13515)).
85
85
86
86
Errors due to non-zero exit codes can be caught in a `try`/`catch` block, and the error record passed to the catch closure will contain an `exit_code` column in this case.
0 commit comments