1
0
mirror of https://github.com/nushell/nushell.git synced 2025-04-16 01:08:21 +02:00
nushell/crates/nu-command/tests
Ian Manske 493850b1bf
Fix IR for try ()
# Description
Fixes a bug in the IR for `try` to match that of the regular evaluator
(continuing from ):
```nushell
# without IR:
try { ^false } catch { 'caught' } # == 'caught'

# with IR:
try { ^false } catch { 'caught' } # error, non-zero exit code
```

In this PR, both now evaluate to `caught`. For the implementation, I had
to add another instruction, and feel free to suggest better
alternatives. In the future, it might be possible to get rid of this
extra instruction.

# User-Facing Changes
Bug fix, `try { ^false } catch { 'caught' }` now works in IR.
2024-09-09 19:44:04 -07:00
..
commands Fix IR for try () 2024-09-09 19:44:04 -07:00
format_conversions Make the subcommands (from {csv, tsv, ssv}) 0-based for consistency () 2024-06-26 17:51:47 -05:00
main.rs Change the usage misnomer to "description" () 2024-08-22 12:02:08 +02:00