Fix #3727: 'doom: command not found' error on 'doom upgrade'
This commit is contained in:
parent
64dfc709bf
commit
d9739a2d10
2 changed files with 4 additions and 3 deletions
2
bin/doom
2
bin/doom
|
@ -7,7 +7,7 @@
|
||||||
:; _DOOMPOST="$_DOOMBASE/.local/.doom.sh"
|
:; _DOOMPOST="$_DOOMBASE/.local/.doom.sh"
|
||||||
:; $EMACS --no-site-file --script "$0" -- "$@"
|
:; $EMACS --no-site-file --script "$0" -- "$@"
|
||||||
:; CODE=$?
|
:; CODE=$?
|
||||||
:; [ -x "$_DOOMPOST" ] && PATH="$_DOOMBASE/bin:$PATH" "$_DOOMPOST" "$0" "$@"
|
:; [ -x "$_DOOMPOST" ] && "$_DOOMPOST" "$0" "$@"
|
||||||
:; exit $CODE
|
:; exit $CODE
|
||||||
|
|
||||||
;; CLI ops tend to eat a lot of memory. To speed it up, stave off the GC, but
|
;; CLI ops tend to eat a lot of memory. To speed it up, stave off the GC, but
|
||||||
|
|
|
@ -177,10 +177,11 @@ COMMAND, and passes ARGS to it."
|
||||||
(insert "#!/usr/bin/env sh\n"
|
(insert "#!/usr/bin/env sh\n"
|
||||||
(save-match-data
|
(save-match-data
|
||||||
(cl-loop for env in process-environment
|
(cl-loop for env in process-environment
|
||||||
if (string-match "^\\([^ !@#$%^&*()=]+\\)=\\(.+\\)$" env)
|
if (string-match "^\\([a-zA-Z0-9_]+\\)=\\(.+\\)$" env)
|
||||||
concat (format "%s=%S\n"
|
concat (format "export %s=%S\n"
|
||||||
(match-string 1 env)
|
(match-string 1 env)
|
||||||
(match-string 2 env))))
|
(match-string 2 env))))
|
||||||
|
(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)
|
||||||
lines
|
lines
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue