diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-05-05 16:40:12 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-05-05 17:08:23 +0200 |
commit | 465cb6824401541d82489e11b5223dbfd50bb132 (patch) | |
tree | 98b112563cbf08c29e94c4ddc0755de95524186f /src/libexpr/parser.y | |
parent | eba840c8a13b465ace90172ff76a0db2899ab11b (diff) |
Figure out the user's home directory if $HOME is not set
Diffstat (limited to 'src/libexpr/parser.y')
-rw-r--r-- | src/libexpr/parser.y | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index d07eeddda..62982650a 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -376,7 +376,7 @@ expr_simple $$ = stripIndentation(CUR_POS, data->symbols, *$2); } | PATH { $$ = new ExprPath(absPath($1, data->basePath)); } - | HPATH { $$ = new ExprPath(getEnv("HOME", "") + string{$1 + 1}); } + | HPATH { $$ = new ExprPath(getHome() + string{$1 + 1}); } | SPATH { string path($1 + 1, strlen($1) - 2); $$ = new ExprApp(CUR_POS, |