diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-05-05T14·40+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-05-05T15·08+0200 |
commit | 465cb6824401541d82489e11b5223dbfd50bb132 (patch) | |
tree | 98b112563cbf08c29e94c4ddc0755de95524186f /src/libexpr | |
parent | eba840c8a13b465ace90172ff76a0db2899ab11b (diff) |
Figure out the user's home directory if $HOME is not set
Diffstat (limited to 'src/libexpr')
-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 d07eedddaf6b..62982650a22e 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, |