nushell: fix get -i deprecation (#7490)
Since https://github.com/nushell/nushell/pull/16007, the recommended flag to avoid erroring on missing fields is `--optional`. To avoid compatibility issues, the builtin optional access syntax is used instead, which is backwards-compatible.
This commit is contained in:
parent
8eb2f2a26a
commit
50adf43449
1 changed files with 2 additions and 2 deletions
|
|
@ -193,8 +193,8 @@ in
|
|||
}
|
||||
}
|
||||
| merge ($env.ENV_CONVERSIONS? | default {})
|
||||
| get -i ([[value, optional, insensitive]; [$key, false, true]] | into cell-path)
|
||||
| get -i from_string
|
||||
| get ([[value, optional, insensitive]; [$key, true, true]] | into cell-path)
|
||||
| get from_string?
|
||||
| if ($in | is-empty) { {|x| $x} } else { $in }
|
||||
) $value
|
||||
return [ $key $value ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue