Fix #3727: 'doom: command not found' error on 'doom upgrade'

This commit is contained in:
Henrik Lissner 2020-08-11 14:26:49 -04:00
parent 64dfc709bf
commit d9739a2d10
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 4 additions and 3 deletions

View file

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