Page MenuHomePhabricator

Implement `setEnv`.
ClosedPublic

Authored by hach-que on Oct 25 2013, 12:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 12:10 PM
Unknown Object (File)
Tue, Dec 10, 2:38 PM
Unknown Object (File)
Tue, Dec 10, 4:31 AM
Unknown Object (File)
Mon, Dec 9, 4:20 AM
Unknown Object (File)
Sun, Dec 8, 11:20 PM
Unknown Object (File)
Sun, Dec 8, 11:20 PM
Unknown Object (File)
Sun, Dec 8, 11:20 PM
Unknown Object (File)
Sun, Dec 8, 10:50 PM

Details

Summary

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

Test Plan

Completely untested.

Diff Detail

Branch
setenv
Lint
Lint Passed
Unit
Tests Passed

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).