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

Side by Side Diff: sdk/lib/_internal/pub/bin/pub.dart

Issue 344413004: Support pub --with-prejudice. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 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 | « no previous file | sdk/lib/_internal/pub/lib/src/command.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 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:http/http.dart' as http; 9 import 'package:http/http.dart' as http;
10 import 'package:path/path.dart' as path; 10 import 'package:path/path.dart' as path;
(...skipping 14 matching lines...) Expand all
25 25
26 try { 26 try {
27 options = PubCommand.pubArgParser.parse(arguments); 27 options = PubCommand.pubArgParser.parse(arguments);
28 } on FormatException catch (e) { 28 } on FormatException catch (e) {
29 log.error(e.message); 29 log.error(e.message);
30 log.error('Run "pub help" to see available options.'); 30 log.error('Run "pub help" to see available options.');
31 flushThenExit(exit_codes.USAGE); 31 flushThenExit(exit_codes.USAGE);
32 return; 32 return;
33 } 33 }
34 34
35 log.withPrejudice = options['with-prejudice'];
36
35 if (options['version']) { 37 if (options['version']) {
36 log.message('Pub ${sdk.version}'); 38 log.message('Pub ${sdk.version}');
37 return; 39 return;
38 } 40 }
39 41
40 if (options['help']) { 42 if (options['help']) {
41 PubCommand.printGlobalUsage(); 43 PubCommand.printGlobalUsage();
42 return; 44 return;
43 } 45 }
44 46
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 if (Platform.operatingSystem != 'windows') return null; 215 if (Platform.operatingSystem != 'windows') return null;
214 216
215 return runProcess('ver', []).then((result) { 217 return runProcess('ver', []).then((result) {
216 if (result.stdout.join('\n').contains('XP')) { 218 if (result.stdout.join('\n').contains('XP')) {
217 log.error('Sorry, but pub is not supported on Windows XP.'); 219 log.error('Sorry, but pub is not supported on Windows XP.');
218 return flushThenExit(exit_codes.USAGE); 220 return flushThenExit(exit_codes.USAGE);
219 } 221 }
220 }); 222 });
221 }); 223 });
222 } 224 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/command.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698