don't propagate DRIP_INIT or DRIP_INIT_CLASS to subprocess

This commit is contained in:
Justin Balthrop 2012-11-19 13:07:36 -08:00
parent f637790eae
commit 77327993ee

View file

@ -142,13 +142,17 @@
"Rebind this to false to disable forwarding *in* to subprocesses."
true)
(def drip-env
{"DRIP_INIT" nil
"DRIP_INIT_CLASS" nil})
(defn- overridden-env
"Returns an overridden version of the current environment as an Array of
Strings of the form name=val, suitable for passing to Runtime#exec."
[env]
(->> (if (:replace (meta env))
env
(merge {} (System/getenv) env))
(merge {} (System/getenv) drip-env env))
(filter val)
(map #(str (name (key %)) "=" (val %)))
(into-array String)))