about summary refs log tree commit diff
path: root/src/libexpr
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2015-02-19T13·49-0500
committerShea Levy <shea@shealevy.com>2015-02-19T13·49-0500
commit4b7c9f834c6e861ced90558a13fe4b78b584b710 (patch)
tree1ad611b0fc7bc2fb031399e38106965bc3cb2db9 /src/libexpr
parent4646e946100f103edd509a716b9c1a8849fc7895 (diff)
tilde paths: get HOME at parse time
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/parser.y4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y
index f4648b902ba4..010024de5645 100644
--- a/src/libexpr/parser.y
+++ b/src/libexpr/parser.y
@@ -379,9 +379,7 @@ expr_simple
   | HPATH {
       auto path = string{$1 + 1};
       $$ = new ExprConcatStrings(CUR_POS, false, new vector<Expr *>{
-          new ExprPath("/"),
-          new ExprApp(new ExprVar(data->symbols.create("__getEnv")),
-              new ExprString(data->symbols.create("HOME"))),
+          new ExprPath(getEnv("HOME", "/")),
           new ExprString(data->symbols.create(path))});
   }
   | SPATH {