mirror of
https://github.com/nushell/nushell.git
synced 2024-11-25 01:43:47 +01:00
5f7afafe51
# Description [Discovered](https://discord.com/channels/601130461678272522/614593951969574961/1266503282554179604) by `@warp` on Discord. The IR compiler was not properly setting redirect modes for subexpressions because `FullCellPath` was always being compiled with capture-out redirection. This is the correct behavior if there is a tail to the `FullCellPath`, as we need the value in order to try to extract anything from it (although this is unlikely to work) - however, the parser also generates `FullCellPath`s with an empty tail quite often, including for bare subexpressions. Because of this, the following did not behave as expected: ```nushell (docker run -it --rm alpine) ``` Capturing the output meant that `docker` didn't have direct access to the terminal as a TTY. As this is a minor bug fix, it should be okay to include in the 0.96.1 patch release. # User-Facing Changes - Fixes the bug as described when running with IR evaluation enabled. # Tests + Formatting I added a test for this, though we're not currently running all tests with IR on the CI, but it should ensure this behaviour is consistent. The equivalent minimum repro I could find was: ```nushell (nu --testbin cococo); null ``` as this should cause the `cococo` message to appear on stdout, and if Nushell is capturing the output, it would be discarded instead. |
||
---|---|---|
.. | ||
environment | ||
pipeline | ||
mod.rs | ||
repl.rs |