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