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

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

Issue 1164203003: Fix path in where pub is located in the main repo (Closed) Base URL: https://github.com/dart-lang/pub.git@master
Patch Set: Created 5 years, 6 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /// Helper functionality to make working with IO easier. 5 /// Helper functionality to make working with IO easier.
6 library pub.io; 6 library pub.io;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:collection'; 9 import 'dart:collection';
10 import 'dart:convert'; 10 import 'dart:convert';
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 final bool runningFromTest = Platform.script.path.endsWith('.test.snapshot'); 489 final bool runningFromTest = Platform.script.path.endsWith('.test.snapshot');
490 490
491 /// Whether pub is running from within the Dart SDK, as opposed to from the Dart 491 /// Whether pub is running from within the Dart SDK, as opposed to from the Dart
492 /// source repository. 492 /// source repository.
493 final bool runningFromSdk = 493 final bool runningFromSdk =
494 !runningFromTest && Platform.script.path.endsWith('.snapshot'); 494 !runningFromTest && Platform.script.path.endsWith('.snapshot');
495 495
496 /// A regular expression to match the script path of a pub script running from 496 /// A regular expression to match the script path of a pub script running from
497 /// source in the Dart repo. 497 /// source in the Dart repo.
498 final _dartRepoRegExp = new RegExp( 498 final _dartRepoRegExp = new RegExp(
499 r"/third_party/pkg_tested/pub/(" 499 r"/third_party/pkg/pub/("
500 r"bin/pub\.dart" 500 r"bin/pub\.dart"
501 r"|" 501 r"|"
502 r"\.pub/pub\.test\.snapshot" 502 r"\.pub/pub\.test\.snapshot"
503 r"|" 503 r"|"
504 r"test/.*_test\.dart" 504 r"test/.*_test\.dart"
505 r")$"); 505 r")$");
506 506
507 /// Whether pub is running from source in the Dart repo. 507 /// Whether pub is running from source in the Dart repo.
508 /// 508 ///
509 /// This can happen when building Observatory, for example. 509 /// This can happen when building Observatory, for example.
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 1065
1066 // TODO(rnystrom): Remove this and change to returning one string. 1066 // TODO(rnystrom): Remove this and change to returning one string.
1067 static List<String> _toLines(String output) { 1067 static List<String> _toLines(String output) {
1068 var lines = splitLines(output); 1068 var lines = splitLines(output);
1069 if (!lines.isEmpty && lines.last == "") lines.removeLast(); 1069 if (!lines.isEmpty && lines.last == "") lines.removeLast();
1070 return lines; 1070 return lines;
1071 } 1071 }
1072 1072
1073 bool get success => exitCode == exit_codes.SUCCESS; 1073 bool get success => exitCode == exit_codes.SUCCESS;
1074 } 1074 }
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