From a35a457a1bd53ad82a14e6df555e4dfa859f02ed Mon Sep 17 00:00:00 2001 From: simendsjo Date: Sun, 3 May 2020 09:45:53 +0200 Subject: [PATCH] Fallback to USERPROFILE for HOME on Windows --- core/core.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/core.el b/core/core.el index 7d36dcbf7..713799e90 100644 --- a/core/core.el +++ b/core/core.el @@ -14,6 +14,10 @@ (defconst IS-WINDOWS (memq system-type '(cygwin windows-nt ms-dos))) (defconst IS-BSD (or IS-MAC (eq system-type 'berkeley-unix))) +;; Unix tools looks for HOME, but this is normally not defined on Windows. +(when (and IS-WINDOWS (null (getenv "HOME"))) + (setenv "HOME" (getenv "USERPROFILE"))) + ;; Ensure `doom-core-dir' is in `load-path' (add-to-list 'load-path (file-name-directory load-file-name))