don't expand variables in no_exec mode

We couldn't know variables values unless execute commands, so disable
variable expansion in no_exec mode.
This commit is contained in:
Grissiom 2010-10-06 11:37:59 +08:00
parent 694cdf5ae1
commit a941d82be3

View file

@ -1514,7 +1514,9 @@ static void parse_job_argument_list( process_t *p,
{
case TOK_STRING:
{
target = (wchar_t *)expand_one( j, wcsdup( tok_last( tok ) ), 0);
target = (wchar_t *)expand_one( j,
wcsdup( tok_last( tok ) ),
no_exec ? EXPAND_SKIP_VARIABLES : 0);
if( target == 0 && error_code == 0 )
{