summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--emacs.d/init.el8
1 files 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