Skip to content
Snippets Groups Projects
Commit 40b83817 authored by ajohnsen@google.com's avatar ajohnsen@google.com Committed by Natalie Weizenbaum
Browse files

Include parent environment by default, add option to not, for Process.

BUG=https://code.google.com/p/dart/issues/detail?id=9294,https://code.google.com/p/dart/issues/detail?id=9295
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//17261026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@24262 260f80e4-7a28-3924-810f-c04153c831b5
parent 52e89ab5
No related branches found
No related tags found
No related merge requests found
......@@ -591,19 +591,12 @@ Future _doProcess(Function fn, String executable, List<String> args,
executable = "cmd";
}
var env = null;
if (environment != null) {
env = new Map.from(Platform.environment);
environment.forEach((key, value) => env[key] = value);
}
log.process(executable, args);
return fn(executable,
args,
workingDirectory: workingDir,
environment: env);
environment: environment);
}
/// Wraps [input] to provide a timeout. If [input] completes before
......
......@@ -453,8 +453,7 @@ ScheduledProcess startPub({List args, Future<Uri> tokenEndpoint}) {
if (tokenEndpoint == null) tokenEndpoint = new Future.value();
var environmentFuture = tokenEndpoint.then((tokenEndpoint) {
// TODO(nweiz): remove this when issue 9294 is fixed.
var environment = new Map.from(Platform.environment);
var environment = {};
environment['_PUB_TESTING'] = 'true';
environment['PUB_CACHE'] = pathInSandbox(cachePath);
environment['DART_SDK'] = pathInSandbox(sdkPath);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment