nushell
nushell copied to clipboard
Wrong command with sudo in pipe results in IO mess.
Describe the bug If some command fails in a pipe command that starts with sudo, the standard IO will be a mess.
To Reproduce Steps to reproduce the behavior:
-
sudo wrong_cmd | something wrong
- input something, you need to keep pressing the keyboard
- press enter.
Expected behavior the sudo won't be executed or the prompt won't show until sudo command ends.
Screenshots
Configuration (please complete the following information):
Run version | pivot
and paste the output to show OS, features, etc.
> version | pivot
────┬────────────────────┬────────────────────────────────────────────────────────
# │ Column0 │ Column1
────┼────────────────────┼────────────────────────────────────────────────────────
0 │ version │ 0.34.0
1 │ branch │ makepkg
2 │ short_commit │ 181ee1da
3 │ commit_hash │ 181ee1dade2aa9fbf7534e658bdd634260010867
4 │ commit_date │ 2021-07-15 09:21:18
5 │ build_os │ linux-x86_64
6 │ rust_version │ rustc 1.55.0-nightly (952fdf2a1 2021-07-05)
7 │ cargo_version │ cargo 1.55.0-nightly (3ebb5f15a 2021-07-02)
8 │ pkg_version │ 0.34.0
9 │ build_time │ 2021-07-15 14:38:43
10 │ build_rust_channel │ release
11 │ features │ ctrlc, dataframe, default, rustyline, term, which, zip
12 │ installed_plugins │
────┴────────────────────┴────────────────────────────────────────────────────────
This sounds like Nushell is having trouble with interactive, "prompt-style" commands.
I also noticed, when Nushell is launched from Bash (i.e., not a default shell), exiting back to Bash locks the bash input -- you type but it's not shown, however, it still gets passed to Bash. I tested with su | foo bar
, then exiting to Bash.
This issue is being marked stale because it has been open for 90 days without activity. If you feel that this is in error, please comment below and we will keep it marked as active. Otherwise, it will be closed in 10 days.
I cannot reproduce the original issue (maybe because I have the password prompt disabled with sudo
) but the su | foo bar
issue is still present.
I'm noticing an issue that I think is similar to this one. Essentially it looks like it boils down to exactly the quote below.
This sounds like Nushell is having trouble with interactive, "prompt-style" commands.
I also noticed, when Nushell is launched from Bash (i.e., not a default shell), exiting back to Bash locks the bash input -- you type but it's not shown, however, it still gets passed to Bash. I tested with
su | foo bar
, then exiting to Bash.

This is on the latest release 0.75.0.
I can't repro either.
Closing, but please reopen if you're able to repro with the latest nushell.