Fix envvar file encoding for Windows users

This commit is contained in:
Henrik Lissner 2020-12-11 15:03:55 -05:00
parent 07db84bfe2
commit 3c8a2a655f
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -92,7 +92,7 @@ default, on Linux, this is '$SHELL -ic /usr/bin/env'. Variables in
(process-environment doom--initial-process-environment))
(when (or force-p (not (file-exists-p env-file)))
(with-temp-file env-file
(setq-local coding-system-for-write 'utf-8)
(setq-local coding-system-for-write 'utf-8-unix)
(print! (start "%s envvars file at %S")
(if (file-exists-p env-file)
"Regenerating"
@ -104,7 +104,7 @@ default, on Linux, this is '$SHELL -ic /usr/bin/env'. Variables in
(goto-char (point-min))
(insert
(concat
"# -*- mode: sh -*-\n"
"# -*- mode: sh; coding: utf-8-unix -*-\n"
"# ---------------------------------------------------------------------------\n"
"# This file was auto-generated by `doom env'. It contains a list of environment\n"
"# variables scraped from your default shell (excluding variables blacklisted\n"