From 465cb6824401541d82489e11b5223dbfd50bb132 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 5 May 2017 16:40:12 +0200 Subject: Figure out the user's home directory if $HOME is not set --- src/libexpr/parser.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libexpr') 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, -- cgit 1.4.1