1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 13:41:15 +02:00

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

This commit is contained in:
Eelco Dolstra 2017-05-05 16:40:12 +02:00
parent eba840c8a1
commit 465cb68244
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
8 changed files with 84 additions and 36 deletions

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,