aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parser.cpp')
-rw-r--r--parser.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/parser.cpp b/parser.cpp
index ed9cab0e..ed2e7cd5 100644
--- a/parser.cpp
+++ b/parser.cpp
@@ -2043,7 +2043,9 @@ static int parse_job( process_t *p,
}
else if(cmd[0]==L'$')
{
- wchar_t *val = env_get( cmd+1 );
+
+ const wcstring val_wstr = env_get_string( cmd+1 );
+ const wchar_t *val = val_wstr.empty()?NULL:val_wstr.c_str();
if( val )
{
debug( 0,