Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Unified Diff: sdk/lib/_internal/pub/test/test_pub.dart

Issue 15883003: Remove ProcessOptions and make the options named arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comments cleanup. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 d788ffc1d711e6f6d3ebdb06e1793e8f452c8e71..90708326f660121477305133a9e7f2c9040616e2 100644
--- a/sdk/lib/_internal/pub/test/test_pub.dart
+++ b/sdk/lib/_internal/pub/test/test_pub.dart
@@ -369,22 +369,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);
nweiz 2013/07/22 20:15:11 Since 9294 is fixed, this should just be initializ
+ 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}');
}
@@ -397,9 +396,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);

Powered by Google App Engine
This is Rietveld 408576698