Open bartoszwjn opened 4 days ago
It should fail like this. not sure why it doesn't.
❯ def foo [] {
::: foo
::: }
❯ foo
Error: nu::shell::recursion_limit_reached
× Recursion limit (50) reached
╭─[entry #57:1:12]
1 │ ╭─▶ def foo [] {
2 │ │ foo
3 │ ├─▶ }
· ╰──── This called itself too many times
╰────
I've also experienced this issue
@bartoszwjn if you have time, it would be good to test #14114 in your real-world scenario to see if that fix works for you.
Yup, it works
Describe the bug
After upgrading to nushell 0.98.0 a Nu script that was previously working now fails with a
nu::shell::variable_not_found
error. The error doesn't point to any specific variable, it seems to be pointing at the entire body of a command.How to reproduce
This is the minimal example that I was able to reduce my original script to.
foo.nu
Run
nu foo.nu
Some variations of this that I tried that don't result in an error:
nu
withNU_DISABLE_IR=1
use foo.nu
instead of running it as a scriptfoo
andbar
foo
callbar
instead of itself$x | foo
$x
, i.e.(1 | foo)
$x
as a parameter and not as pipeline inputExpected behavior
I expected the script to just do nothing and exit without an error.
Configuration
The same happens with a version of Nu built from the current main branch (639bd4fc2eec0134f70a2bbda771f7a0b558ebc4)