| 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 library pub.command_runner; | |
| 6 | |
| 7 import 'dart:async'; | 5 import 'dart:async'; |
| 8 import 'dart:io'; | 6 import 'dart:io'; |
| 9 | 7 |
| 10 import 'package:args/args.dart'; | 8 import 'package:args/args.dart'; |
| 11 import 'package:args/command_runner.dart'; | 9 import 'package:args/command_runner.dart'; |
| 12 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| 13 import 'package:path/path.dart' as p; | 11 import 'package:path/path.dart' as p; |
| 14 | 12 |
| 15 import 'command/build.dart'; | 13 import 'command/build.dart'; |
| 16 import 'command/cache.dart'; | 14 import 'command/cache.dart'; |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 Future _validatePlatform() async { | 213 Future _validatePlatform() async { |
| 216 if (Platform.operatingSystem != 'windows') return; | 214 if (Platform.operatingSystem != 'windows') return; |
| 217 | 215 |
| 218 var result = await runProcess('ver', []); | 216 var result = await runProcess('ver', []); |
| 219 if (result.stdout.join('\n').contains('XP')) { | 217 if (result.stdout.join('\n').contains('XP')) { |
| 220 log.error('Sorry, but pub is not supported on Windows XP.'); | 218 log.error('Sorry, but pub is not supported on Windows XP.'); |
| 221 await flushThenExit(exit_codes.USAGE); | 219 await flushThenExit(exit_codes.USAGE); |
| 222 } | 220 } |
| 223 } | 221 } |
| 224 } | 222 } |
| OLD | NEW |