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

Side by Side Diff: pkg/analyzer/lib/options.dart

Issue 46063010: Change dart:io Platform.script to return a Uri. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 7 years, 1 month 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 | « no previous file | pkg/analyzer/lib/src/services/runtime/coverage/coverage_impl.dart » ('j') | 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 library options; 5 library options;
6 6
7 import 'package:args/args.dart'; 7 import 'package:args/args.dart';
8 import 'package:path/path.dart'; 8 import 'package:path/path.dart';
9 9
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 static _showUsage(parser) { 169 static _showUsage(parser) {
170 print('Usage: $_BINARY_NAME [options...] <libraries to analyze...>'); 170 print('Usage: $_BINARY_NAME [options...] <libraries to analyze...>');
171 print(parser.getUsage()); 171 print(parser.getUsage());
172 print(''); 172 print('');
173 print('For more information, see http://www.dartlang.org/tools/analyzer.'); 173 print('For more information, see http://www.dartlang.org/tools/analyzer.');
174 } 174 }
175 175
176 static String _getVersion() { 176 static String _getVersion() {
177 try { 177 try {
178 String versionPath = join(dirname(Platform.script), '..', 'version');; 178 String versionPath = Platform.script.resolve('../version').toFilePath();
179 File versionFile = new File(versionPath); 179 File versionFile = new File(versionPath);
180 return versionFile.readAsStringSync().trim(); 180 return versionFile.readAsStringSync().trim();
181 } catch (_) { 181 } catch (_) {
182 // This happens when the script is not running in the context of an SDK. 182 // This happens when the script is not running in the context of an SDK.
183 return "<unknown>"; 183 return "<unknown>";
184 } 184 }
185 } 185 }
186 } 186 }
187 187
188 /** 188 /**
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 _getNextFlagIndex(args, i) { 278 _getNextFlagIndex(args, i) {
279 for ( ; i < args.length; ++i) { 279 for ( ; i < args.length; ++i) {
280 if (args[i].startsWith('--')) { 280 if (args[i].startsWith('--')) {
281 return i; 281 return i;
282 } 282 }
283 } 283 }
284 return i; 284 return i;
285 } 285 }
286 } 286 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/services/runtime/coverage/coverage_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698