Page MenuHomePhabricator

Implement `setEnv`.
ClosedPublic

Authored by hach-que on Oct 25 2013, 12:10 PM.
Tags
None
Referenced Files
F14835331: D7396.id16689.diff
Thu, Jan 30, 8:22 PM
Unknown Object (File)
Tue, Jan 28, 1:05 PM
Unknown Object (File)
Sat, Jan 18, 3:01 PM
Unknown Object (File)
Fri, Jan 17, 2:18 PM
Unknown Object (File)
Sat, Jan 11, 6:18 PM
Unknown Object (File)
Dec 22 2024, 8:08 PM
Unknown Object (File)
Dec 22 2024, 2:52 PM
Unknown Object (File)
Dec 13 2024, 12:10 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).