From 04f5242238eaf225f194114d97fd69bf6a6e9359 Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 29 Jan 2024 20:20:20 +0100 Subject: mkay --- src/c_utils.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/c_utils.go') diff --git a/src/c_utils.go b/src/c_utils.go index 5bf4ae6..df49a4f 100644 --- a/src/c_utils.go +++ b/src/c_utils.go @@ -64,7 +64,11 @@ func c_get_data_dir(ui *HardUI) string { var ptr string var home string if home = os.Getenv("HOME"); len(home) == 0 { - c_die("env variable HOME not defined", nil) + if ui == nil { + c_die("env variable HOME not defined", nil) + } + c_error_mode("env variable HOME not defined", nil, ui) + return "" } xdg_home := os.Getenv("XDG_DATA_HOME") -- cgit v1.2.3