Page MenuHomePhabricator

Implement `setEnv`.
ClosedPublic

Authored by hach-que on Oct 25 2013, 12:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 1, 10:21 PM
Unknown Object (File)
Fri, Feb 28, 12:05 PM
Unknown Object (File)
Thu, Feb 27, 3:22 AM
Unknown Object (File)
Wed, Feb 26, 6:29 AM
Unknown Object (File)
Wed, Feb 26, 6:29 AM
Unknown Object (File)
Wed, Feb 26, 6:28 AM
Unknown Object (File)
Mon, Feb 24, 2:59 AM
Unknown Object (File)
Thu, Feb 13, 9:57 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).