Fix get -i ignoring errors for only the first cellpath (#11213)

# Description
Fixes issue #11212 where only the first cellpath supplied to `get -i` is
treated as optional, and the rest of the cell paths are treated as
non-optional.

# Tests
Added one test.
This commit is contained in:
Ian Manske
2023-12-02 17:01:08 +00:00
committed by GitHub
parent 7d8df4ba9e
commit 35e8db160d
2 changed files with 11 additions and 1 deletions

View File

@ -200,3 +200,10 @@ fn ignore_errors_works() {
assert_eq!(actual.out, "null");
}
#[test]
fn ignore_multiple() {
let actual = nu!(r#"[[a];[b]] | get -i c d | to nuon"#);
assert_eq!(actual.out, "[[null], [null]]");
}