Merge pull request #3023 from simendsjo/userprofile-for-home-on-windows

Fallback to USERPROFILE for HOME on Windows
This commit is contained in:
Henrik Lissner 2020-05-03 13:39:18 -04:00 committed by GitHub
commit a4b0fd2bf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))