Page MenuHomePhabricator

Implement `setEnv`.
ClosedPublic

Authored by hach-que on Oct 25 2013, 12:10 PM.
Tags
None
Referenced Files
F19826082: D7396.diff
Sun, Mar 8, 5:03 PM
F19531800: D7396.id16689.diff
Jan 20 2026, 7:02 AM
F19100511: D7396.id.diff
Dec 4 2025, 11:20 PM
F19045131: D7396.id16688.diff
Nov 27 2025, 6:34 AM
F18930293: D7396.id16661.diff
Nov 10 2025, 1:41 AM
F18905779: D7396.id.diff
Nov 8 2025, 3:39 PM
F18896169: D7396.diff
Nov 7 2025, 3:48 PM
F18875946: D7396.diff
Nov 5 2025, 8:37 PM

Details

Summary

Implements setEnv on ExecFuture so that the environment variable can be set.

Test Plan

Completely untested.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley requested changes to this revision.

Oh, actually, I think we should mimic the implementation in PhutilExecPassthru:

public function setEnv(array $env, $wipe_process_env = false) {
  if ($wipe_process_env) {
    $this->env = $env;
  } else {
    $this->env = $env + $_ENV;
  }
  return $this->env;
}

This has the side effect of wiping out the current process's ENV, which probably breaks some things.

hach-que updated this revision to Unknown Object (????).Oct 25 2013, 9:41 PM
  • Update setEnv according to feedback
epriestley closed this revision.

Closed by commit rPHUba9c9426ab45 (authored by @hach-que, committed by @epriestley).