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

Side by Side Diff: lib/src/executable.dart

Issue 1561743002: Work around dart-lang/sdk#25348. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library pub.executable; 5 library pub.executable;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:barback/barback.dart'; 10 import 'package:barback/barback.dart';
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 var process = await Process.start(Platform.executable, vmArgs); 134 var process = await Process.start(Platform.executable, vmArgs);
135 135
136 _forwardSignals(process); 136 _forwardSignals(process);
137 137
138 // Note: we're not using process.std___.pipe(std___) here because 138 // Note: we're not using process.std___.pipe(std___) here because
139 // that prevents pub from also writing to the output streams. 139 // that prevents pub from also writing to the output streams.
140 process.stderr.listen(stderr.add); 140 process.stderr.listen(stderr.add);
141 process.stdout.listen(stdout.add); 141 process.stdout.listen(stdout.add);
142 stdin.listen(process.stdin.add); 142 stdin.listen(process.stdin.add);
143 143
144 return process.exitCode; 144 // Work around dart-lang/sdk#25348.
145 process.stdin.done.catchError((_) {});
146
147 return await process.exitCode;
145 } 148 }
146 149
147 /// Returns the URL the VM should use to load the executable at [path]. 150 /// Returns the URL the VM should use to load the executable at [path].
148 /// 151 ///
149 /// [path] must be relative to the root of [package]. If [path] doesn't exist, 152 /// [path] must be relative to the root of [package]. If [path] doesn't exist,
150 /// returns `null`. 153 /// returns `null`.
151 Future<Uri> _executableUrl(Entrypoint entrypoint, String package, String path, 154 Future<Uri> _executableUrl(Entrypoint entrypoint, String package, String path,
152 {bool isGlobal: false, BarbackMode mode}) async { 155 {bool isGlobal: false, BarbackMode mode}) async {
153 assert(p.isRelative(path)); 156 assert(p.isRelative(path));
154 157
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 Future<int> _runCachedExecutable(Entrypoint entrypoint, String snapshotPath, 287 Future<int> _runCachedExecutable(Entrypoint entrypoint, String snapshotPath,
285 List<String> args, {bool checked: false}) { 288 List<String> args, {bool checked: false}) {
286 return runSnapshot(snapshotPath, args, 289 return runSnapshot(snapshotPath, args,
287 packagesFile: entrypoint.packagesFile, 290 packagesFile: entrypoint.packagesFile,
288 checked: checked, 291 checked: checked,
289 recompile: () { 292 recompile: () {
290 log.fine("Precompiled executable is out of date."); 293 log.fine("Precompiled executable is out of date.");
291 return entrypoint.precompileExecutables(); 294 return entrypoint.precompileExecutables();
292 }); 295 });
293 } 296 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698