mirror of
https://github.com/nushell/nushell.git
synced 2024-12-23 23:49:44 +01:00
1402508416
# Description Fix #10506 by adding `ExpectedNonNull` `ShellError` if required field is entered as `$nothing`, `null`, " ", etc. This adds a new `ShellError`, `ExpectedNonNull`, taking the expected type and span. # User-Facing Changes Will get a more helpful error in the case described by #10506. Examples: ```nushell ➜ {scheme: "", host: "github.com"} | url join Error: nu:🐚:expected_non_null × Expected string found null. ╭─[entry #16:1:1] 1 │ {scheme: "", host: "github.com"} | url join · ─┬ · ╰── expected string, found null ╰──── ``` ```nushell ❯ {scheme: "https", host: null} | url join Error: nu:🐚:expected_non_null × Expected string found null. ╭─[entry #19:1:1] 1 │ {scheme: "https", host: null} | url join · ──┬─ · ╰── expected string, found null ╰──── ``` # Tests + Formatting All pass. |
||
---|---|---|
.. | ||
src | ||
tests | ||
Cargo.toml | ||
LICENSE |