mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 04:13:08 +00:00
parent
c181de1d7f
commit
51527612d3
7 changed files with 18 additions and 5 deletions
6
exec.cpp
6
exec.cpp
|
@ -516,9 +516,6 @@ static void internal_exec_helper(parser_t &parser,
|
|||
std::vector<int> opened_fds;
|
||||
bool transmorgrified = io_transmogrify(ios, &morphed_chain, &opened_fds);
|
||||
|
||||
int is_block_old=is_block;
|
||||
is_block=1;
|
||||
|
||||
/*
|
||||
Did the transmogrification fail - if so, set error status and return
|
||||
*/
|
||||
|
@ -528,6 +525,9 @@ static void internal_exec_helper(parser_t &parser,
|
|||
return;
|
||||
}
|
||||
|
||||
int is_block_old=is_block;
|
||||
is_block=1;
|
||||
|
||||
signal_unblock();
|
||||
|
||||
if (node_offset == NODE_OFFSET_INVALID)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/fish
|
||||
#!/usr/bin/env fish
|
||||
|
||||
#
|
||||
# Generate output for a test script
|
||||
|
@ -14,4 +14,4 @@ for i in $argv
|
|||
|
||||
fish <$i >$template_out ^$template_err
|
||||
echo $status >$template_status
|
||||
end
|
||||
end
|
||||
|
|
2
tests/status.err
Normal file
2
tests/status.err
Normal file
|
@ -0,0 +1,2 @@
|
|||
fish: An error occurred while redirecting file '/'
|
||||
open: Is a directory
|
9
tests/status.in
Normal file
9
tests/status.in
Normal file
|
@ -0,0 +1,9 @@
|
|||
# vim: set filetype=fish:
|
||||
|
||||
# Issue #1728
|
||||
# Bad file redirection on a block causes `status --is-block` to return 0 forever.
|
||||
begin; end >/ # / is a directory, it can't be opened for writing
|
||||
status -b
|
||||
and echo 'block'
|
||||
|
||||
true
|
0
tests/status.out
Normal file
0
tests/status.out
Normal file
1
tests/status.status
Normal file
1
tests/status.status
Normal file
|
@ -0,0 +1 @@
|
|||
0
|
|
@ -2,6 +2,7 @@ Testing high level script functionality
|
|||
File expansion.in tested ok
|
||||
File printf.in tested ok
|
||||
File read.in tested ok
|
||||
File status.in tested ok
|
||||
File test1.in tested ok
|
||||
File test2.in tested ok
|
||||
File test3.in tested ok
|
||||
|
|
Loading…
Reference in a new issue