From bdfc592a37dd3103578f381b0acd7b888b893f1d Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Fri, 14 Oct 2016 14:23:25 -0700 Subject: [emacs] Copy more environment variables. For the linter in puppet to work correctly, we need to copy the environment variables for GEM and so on. --- emacs.d/init.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/emacs.d/init.el b/emacs.d/init.el index 7661aa0..fdddbc1 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -42,11 +42,15 @@ :config (setq dired-listing-switches "-laGhv")) +;; environment fixup for macOS. (use-package exec-path-from-shell :ensure t + :if (and (eq system-type 'darwin) (display-graphic-p)) :config - (when (memq window-system '(mac ns)) - (exec-path-from-shell-initialize))) + (progn + (setq exec-path-from-shell-arguments '("-l")) + (exec-path-from-shell-initialize) + (exec-path-from-shell-copy-envs '("PATH" "GOROOT" "GOPATH" "GEM_HOME" "GEM_PATH" "MY_RUBY_HOME")))) (use-package flycheck :ensure t -- cgit 1.4.1