mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 18:21:16 -03:00
src/exec: fix assertion on failed exec redirection
Minimal reproducer: `fish -c "exec cat<x"`
This commit is contained in:
committed by
ridiculousfish
parent
b247c8d9ad
commit
6e9250425a
4
tests/test_exec_fail.err
Normal file
4
tests/test_exec_fail.err
Normal file
@@ -0,0 +1,4 @@
|
||||
<W> fish: An error occurred while redirecting file 'nosuchfile'
|
||||
open: No such file or directory
|
||||
<W> fish: An error occurred while redirecting file 'nosuchfile'
|
||||
open: No such file or directory
|
||||
6
tests/test_exec_fail.in
Normal file
6
tests/test_exec_fail.in
Normal file
@@ -0,0 +1,6 @@
|
||||
exec cat < nosuchfile
|
||||
echo "failed: $status"
|
||||
not exec cat < nosuchfile
|
||||
echo "neg failed: $status"
|
||||
exec cat < /dev/null
|
||||
echo "not reached"
|
||||
2
tests/test_exec_fail.out
Normal file
2
tests/test_exec_fail.out
Normal file
@@ -0,0 +1,2 @@
|
||||
failed: 1
|
||||
neg failed: 0
|
||||
1
tests/test_exec_fail.status
Normal file
1
tests/test_exec_fail.status
Normal file
@@ -0,0 +1 @@
|
||||
0
|
||||
Reference in New Issue
Block a user