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

Side by Side Diff: runtime/bin/process_impl.dart

Issue 10689065: Deal with special cmd.exe environment variables that have keys that start with an equals sign. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/platform_impl.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class _ProcessStartStatus { 5 class _ProcessStartStatus {
6 int _errorCode; // Set to OS error code if process start failed. 6 int _errorCode; // Set to OS error code if process start failed.
7 String _errorMessage; // Set to OS error message if process start failed. 7 String _errorMessage; // Set to OS error message if process start failed.
8 } 8 }
9 9
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 var env = options.environment; 57 var env = options.environment;
58 if (env is !Map) { 58 if (env is !Map) {
59 throw new IllegalArgumentException("Environment is not a map: $env"); 59 throw new IllegalArgumentException("Environment is not a map: $env");
60 } 60 }
61 _environment = []; 61 _environment = [];
62 env.forEach((key, value) { 62 env.forEach((key, value) {
63 if (key is !String || value is !String) { 63 if (key is !String || value is !String) {
64 throw new IllegalArgumentException( 64 throw new IllegalArgumentException(
65 "Environment key or value is not a string: ($key, $value)"); 65 "Environment key or value is not a string: ($key, $value)");
66 } 66 }
67 if (key.contains('=')) {
68 throw new IllegalArgumentException(
69 "Environment keys may not contain '=': $key");
70 }
71 _environment.add('$key=$value'); 67 _environment.add('$key=$value');
72 }); 68 });
73 } 69 }
74 70
75 _in = new _Socket._internalReadOnly(); // stdout coming from process. 71 _in = new _Socket._internalReadOnly(); // stdout coming from process.
76 _out = new _Socket._internalWriteOnly(); // stdin going to process. 72 _out = new _Socket._internalWriteOnly(); // stdin going to process.
77 _err = new _Socket._internalReadOnly(); // stderr coming from process. 73 _err = new _Socket._internalReadOnly(); // stderr coming from process.
78 _exitHandler = new _Socket._internalReadOnly(); 74 _exitHandler = new _Socket._internalReadOnly();
79 _closed = false; 75 _closed = false;
80 _ended = false; 76 _ended = false;
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 390
395 class _ProcessResult implements ProcessResult { 391 class _ProcessResult implements ProcessResult {
396 const _ProcessResult(int this.exitCode, 392 const _ProcessResult(int this.exitCode,
397 String this.stdout, 393 String this.stdout,
398 String this.stderr); 394 String this.stderr);
399 395
400 final int exitCode; 396 final int exitCode;
401 final String stdout; 397 final String stdout;
402 final String stderr; 398 final String stderr;
403 } 399 }
OLDNEW
« no previous file with comments | « runtime/bin/platform_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698