summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franckcuny@gmail.com>2016-05-25 16:49:30 -0700
committerFranck Cuny <franckcuny@gmail.com>2016-05-25 16:49:30 -0700
commit439d40da27dfe78f0b00f191791d72d75fdc631c (patch)
tree247d79cc68f723c2c55d56ad4bc0beafb86d157f
parent[zsh] Remove configuration for zsh (diff)
downloademacs.d-439d40da27dfe78f0b00f191791d72d75fdc631c.tar.gz
[emacs] copy environment variables for Ruby
This is needed to get 'puppet-lint' running correctly.
Diffstat (limited to '')
-rw-r--r--emacs.d/modes/cfg-puppet.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/emacs.d/modes/cfg-puppet.el b/emacs.d/modes/cfg-puppet.el
index d505ffc..e08848d 100644
--- a/emacs.d/modes/cfg-puppet.el
+++ b/emacs.d/modes/cfg-puppet.el
@@ -1,3 +1,8 @@
+(when (memq window-system '(mac ns x))
+    (dolist (var '("GEM_HOME" "MY_RUBY_HOME"))
+      (unless (getenv var)
+        (exec-path-from-shell-copy-env var))))
+
 (use-package puppet-mode
   :ensure t
   :mode ("\\.pp$" . puppet-mode)