hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit a7528cceb3c95f2acbdae5da40f57430febb0c38
parent 37594c3b9181878da275144322ddd5d98c57fceb
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sat, 10 Apr 2021 20:03:03 -0400

dirs: assume $HOME is always set

This is guaranteed by POSIX as part of login(1).

Diffstat:
Mdirs/xdg.ha | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/dirs/xdg.ha b/dirs/xdg.ha @@ -22,11 +22,7 @@ fn lookup(prog: str, var: str, default: str) str = { void => void, }; - let home = match (os::getenv("HOME")) { - s: str => s, - void => abort("$HOME unset"), // TODO: Try reading /etc/passwd - }; - + let home = os::getenv("HOME") as str; let path = path::join(home, default, prog); os::mkdirs(path) as void; return path;