about summary refs log tree commit diff
path: root/src/libexpr/parser.y
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-05-05T14·40+0200
committerEelco Dolstra <edolstra@gmail.com>2017-05-05T15·08+0200
commit465cb6824401541d82489e11b5223dbfd50bb132 (patch)
tree98b112563cbf08c29e94c4ddc0755de95524186f /src/libexpr/parser.y
parenteba840c8a13b465ace90172ff76a0db2899ab11b (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.y2
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,