Index: sdk/lib/_internal/pub/test/test_pub.dart |
diff --git a/sdk/lib/_internal/pub/test/test_pub.dart b/sdk/lib/_internal/pub/test/test_pub.dart |
index 37bf6d0b452120365b208c03c6eebbf1cb734518..ad6035ae15040c64b187ec48cfd6d6162b02e035 100644 |
--- a/sdk/lib/_internal/pub/test/test_pub.dart |
+++ b/sdk/lib/_internal/pub/test/test_pub.dart |
@@ -371,22 +371,21 @@ ScheduledProcess startPub({List args, Future<Uri> tokenEndpoint}) { |
dartArgs.addAll(args); |
if (tokenEndpoint == null) tokenEndpoint = new Future.value(); |
- var optionsFuture = tokenEndpoint.then((tokenEndpoint) { |
- var options = new ProcessOptions(); |
- options.workingDirectory = pathInSandbox(appPath); |
+ var environmentFuture = tokenEndpoint.then((tokenEndpoint) { |
// TODO(nweiz): remove this when issue 9294 is fixed. |
- options.environment = new Map.from(Platform.environment); |
- options.environment['_PUB_TESTING'] = 'true'; |
- options.environment['PUB_CACHE'] = pathInSandbox(cachePath); |
- options.environment['DART_SDK'] = pathInSandbox(sdkPath); |
+ var environment = new Map.from(Platform.environment); |
+ environment['_PUB_TESTING'] = 'true'; |
+ environment['PUB_CACHE'] = pathInSandbox(cachePath); |
+ environment['DART_SDK'] = pathInSandbox(sdkPath); |
if (tokenEndpoint != null) { |
- options.environment['_PUB_TEST_TOKEN_ENDPOINT'] = |
+ environment['_PUB_TEST_TOKEN_ENDPOINT'] = |
tokenEndpoint.toString(); |
} |
- return options; |
+ return environment; |
}); |
- return new PubProcess.start(dartBin, dartArgs, options: optionsFuture, |
+ return new PubProcess.start(dartBin, dartArgs, environment: environmentFuture, |
+ workingDirectory: pathInSandbox(appPath), |
description: args.isEmpty ? 'pub' : 'pub ${args.first}'); |
} |
@@ -399,9 +398,11 @@ class PubProcess extends ScheduledProcess { |
Stream<String> _stderr; |
PubProcess.start(executable, arguments, |
- {options, String description, Encoding encoding: Encoding.UTF_8}) |
+ {workingDirectory, environment, String description, |
+ Encoding encoding: Encoding.UTF_8}) |
: super.start(executable, arguments, |
- options: options, |
+ workingDirectory: workingDirectory, |
+ environment: environment, |
description: description, |
encoding: encoding); |