mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 03:01:15 -03:00
Make fish_indent stop panicing on closed stdin
Prior to this commit, this code:
fish_indent <&-
would panic as we would construct a File with a negative fd.
Check for a closed fd as other builtins do.
This commit is contained in:
@@ -652,3 +652,7 @@ cat $tmpdir/indent_test.fish
|
||||
# See that the builtin can be redirected
|
||||
printf %s\n a b c | builtin fish_indent | grep b
|
||||
# CHECK: b
|
||||
|
||||
# Regression test that fish_indent doesn't panic with closed stdin.
|
||||
fish_indent <&-
|
||||
# CHECKERR: fish_indent: stdin is closed
|
||||
|
||||
Reference in New Issue
Block a user