Fix extract-vars-from-env-file

This commit is contained in:
Jeremy Dormitzer 2020-01-08 11:06:44 -05:00
parent 06dd59602e
commit 9fdfae0533

View File

@ -441,6 +441,7 @@ Load environment variables into Emacs from a shell script:
(let ((var-re "\\(.+?\\)=\\(.+\\)$") (let ((var-re "\\(.+?\\)=\\(.+\\)$")
(env '())) (env '()))
(with-temp-buffer (with-temp-buffer
(cd (file-name-directory file))
(shell-command (concat "source " file " > /dev/null && env") (shell-command (concat "source " file " > /dev/null && env")
(current-buffer)) (current-buffer))
(goto-char (point-min)) (goto-char (point-min))