bin/doom: escape envvars in post-script

Might address #3746
This commit is contained in:
Henrik Lissner 2020-08-15 15:13:04 -04:00
parent 4ad9b764e1
commit 9a8fc46c74
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -178,9 +178,9 @@ COMMAND, and passes ARGS to it."
(save-match-data (save-match-data
(cl-loop for env in process-environment (cl-loop for env in process-environment
if (string-match "^\\([a-zA-Z0-9_]+\\)=\\(.+\\)$" env) if (string-match "^\\([a-zA-Z0-9_]+\\)=\\(.+\\)$" env)
concat (format "export %s=%S\n" concat (format "export %s=%s;\n"
(match-string 1 env) (match-string 1 env)
(match-string 2 env)))) (shell-quote-argument (match-string 2 env)))))
(format "\nexport PATH=\"%s:$PATH\"\n" (concat doom-emacs-dir "bin/")) (format "\nexport PATH=\"%s:$PATH\"\n" (concat doom-emacs-dir "bin/"))
"\n[ -x \"$0\" ] && rm -f \"$0\"\n" "\n[ -x \"$0\" ] && rm -f \"$0\"\n"
(if (stringp lines) (if (stringp lines)