Figure out the user's home directory if $HOME is not set

This commit is contained in:
Eelco Dolstra
2017-05-05 17:08:23 +02:00
parent eba840c8a1
commit 465cb68244
8 changed files with 84 additions and 36 deletions
+1 -1
View File
@@ -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,