mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 14:03:58 +00:00
Ignore return code of exec_subshell when doing command substitution
darcs-hash:20060824005217-ac50b-9de976e1fe2d396b08b59619e46669bad6598ec2.gz
This commit is contained in:
parent
69814e5066
commit
1a29979bbd
1 changed files with 1 additions and 7 deletions
8
expand.c
8
expand.c
|
@ -1232,13 +1232,7 @@ static int expand_cmdsubst( wchar_t *in, array_list_t *out )
|
||||||
wcslcpy( subcmd, paran_begin+1, paran_end-paran_begin );
|
wcslcpy( subcmd, paran_begin+1, paran_end-paran_begin );
|
||||||
subcmd[ paran_end-paran_begin-1]=0;
|
subcmd[ paran_end-paran_begin-1]=0;
|
||||||
|
|
||||||
if( exec_subshell( subcmd, &sub_res)==-1 )
|
exec_subshell( subcmd, &sub_res);
|
||||||
{
|
|
||||||
al_foreach( &sub_res, &free );
|
|
||||||
al_destroy( &sub_res );
|
|
||||||
free( subcmd );
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
al_init( &tail_expand );
|
al_init( &tail_expand );
|
||||||
expand_cmdsubst( wcsdup(paran_end+1), &tail_expand );
|
expand_cmdsubst( wcsdup(paran_end+1), &tail_expand );
|
||||||
|
|
Loading…
Reference in a new issue