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

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

Issue 2184303002: Make pub strong-mode clean. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 4 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 | « lib/src/command/serve.dart ('k') | lib/src/dart.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) 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 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import 'package:args/args.dart'; 8 import 'package:args/args.dart';
9 import 'package:args/command_runner.dart'; 9 import 'package:args/command_runner.dart';
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 addCommand(new GetCommand()); 72 addCommand(new GetCommand());
73 addCommand(new ListPackageDirsCommand()); 73 addCommand(new ListPackageDirsCommand());
74 addCommand(new LishCommand()); 74 addCommand(new LishCommand());
75 addCommand(new RunCommand()); 75 addCommand(new RunCommand());
76 addCommand(new ServeCommand()); 76 addCommand(new ServeCommand());
77 addCommand(new UpgradeCommand()); 77 addCommand(new UpgradeCommand());
78 addCommand(new UploaderCommand()); 78 addCommand(new UploaderCommand());
79 addCommand(new VersionCommand()); 79 addCommand(new VersionCommand());
80 } 80 }
81 81
82 Future run(List<String> arguments) async { 82 Future run(Iterable<String> arguments) async {
83 var options; 83 var options;
84 try { 84 try {
85 options = super.parse(arguments); 85 options = super.parse(arguments);
86 } on UsageException catch (error) { 86 } on UsageException catch (error) {
87 log.exception(error); 87 log.exception(error);
88 await flushThenExit(exit_codes.USAGE); 88 await flushThenExit(exit_codes.USAGE);
89 } 89 }
90 await runCommand(options); 90 await runCommand(options);
91 } 91 }
92 92
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 Future _validatePlatform() async { 216 Future _validatePlatform() async {
217 if (Platform.operatingSystem != 'windows') return; 217 if (Platform.operatingSystem != 'windows') return;
218 218
219 var result = await runProcess('ver', []); 219 var result = await runProcess('ver', []);
220 if (result.stdout.join('\n').contains('XP')) { 220 if (result.stdout.join('\n').contains('XP')) {
221 log.error('Sorry, but pub is not supported on Windows XP.'); 221 log.error('Sorry, but pub is not supported on Windows XP.');
222 await flushThenExit(exit_codes.USAGE); 222 await flushThenExit(exit_codes.USAGE);
223 } 223 }
224 } 224 }
225 } 225 }
OLDNEW
« no previous file with comments | « lib/src/command/serve.dart ('k') | lib/src/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698