| OLD | NEW | 
|    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  Loading... | 
|   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  Loading... | 
|  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 } | 
| OLD | NEW |