Page MenuHomePhabricator

D7762.id.diff
No OneTemporary

D7762.id.diff

Index: src/future/exec/ExecFuture.php
===================================================================
--- src/future/exec/ExecFuture.php
+++ src/future/exec/ExecFuture.php
@@ -186,6 +186,29 @@
}
+ /**
+ * Set the value of a specific environmental variable for this command.
+ *
+ * @param string Environmental variable name.
+ * @param string|null New value, or null to remove this variable.
+ * @return this
+ * @task config
+ */
+ public function updateEnv($key, $value) {
+ if (!is_array($this->env)) {
+ $this->env = $_ENV;
+ }
+
+ if ($value === null) {
+ unset($this->env[$key]);
+ } else {
+ $this->env[$key] = $value;
+ }
+
+ return $this;
+ }
+
+
/* -( Interacting With Commands )------------------------------------------ */

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 16, 2:26 PM (4 d, 15 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7706969
Default Alt Text
D7762.id.diff (803 B)

Event Timeline