aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.c
diff options
context:
space:
mode:
authorGravatar Grissiom <chaos.proton@gmail.com>2010-10-06 11:37:59 +0800
committerGravatar Grissiom <chaos.proton@gmail.com>2010-10-06 11:37:59 +0800
commita941d82be374da90a0736616790372452824c191 (patch)
tree395bc9c8ce08703b30e0ff4f21194dbefdf991c8 /parser.c
parent694cdf5ae1b1376df5bad87140cd9c2c7958defe (diff)
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.
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/parser.c b/parser.c
index e3fc738d..485f8ac8 100644
--- a/parser.c
+++ b/parser.c
@@ -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 )
{