| OLD | NEW |
| 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 import 'dart:math' as math; | 7 import 'dart:math' as math; |
| 8 | 8 |
| 9 import 'package:args/args.dart'; | 9 import 'package:args/args.dart'; |
| 10 import 'package:pathos/path.dart' as path; | 10 import 'package:pathos/path.dart' as path; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 default: | 73 default: |
| 74 // No specific verbosity given, so check for the shortcut. | 74 // No specific verbosity given, so check for the shortcut. |
| 75 if (globalOptions['verbose']) { | 75 if (globalOptions['verbose']) { |
| 76 log.showAll(); | 76 log.showAll(); |
| 77 } else { | 77 } else { |
| 78 log.showNormal(); | 78 log.showNormal(); |
| 79 } | 79 } |
| 80 break; | 80 break; |
| 81 } | 81 } |
| 82 | 82 |
| 83 log.fine('Pub ${sdk.version}'); |
| 84 |
| 83 var cacheDir; | 85 var cacheDir; |
| 84 if (Platform.environment.containsKey('PUB_CACHE')) { | 86 if (Platform.environment.containsKey('PUB_CACHE')) { |
| 85 cacheDir = Platform.environment['PUB_CACHE']; | 87 cacheDir = Platform.environment['PUB_CACHE']; |
| 86 } else if (Platform.operatingSystem == 'windows') { | 88 } else if (Platform.operatingSystem == 'windows') { |
| 87 var appData = Platform.environment['APPDATA']; | 89 var appData = Platform.environment['APPDATA']; |
| 88 cacheDir = path.join(appData, 'Pub', 'Cache'); | 90 cacheDir = path.join(appData, 'Pub', 'Cache'); |
| 89 } else { | 91 } else { |
| 90 cacheDir = '${Platform.environment['HOME']}/.pub-cache'; | 92 cacheDir = '${Platform.environment['HOME']}/.pub-cache'; |
| 91 } | 93 } |
| 92 | 94 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 for (var name in names) { | 150 for (var name in names) { |
| 149 buffer.write(' ${padRight(name, length)} ' | 151 buffer.write(' ${padRight(name, length)} ' |
| 150 '${PubCommand.commands[name].description}\n'); | 152 '${PubCommand.commands[name].description}\n'); |
| 151 } | 153 } |
| 152 | 154 |
| 153 buffer.write('\n'); | 155 buffer.write('\n'); |
| 154 buffer.write( | 156 buffer.write( |
| 155 'Use "pub help [command]" for more information about a command.'); | 157 'Use "pub help [command]" for more information about a command.'); |
| 156 log.message(buffer.toString()); | 158 log.message(buffer.toString()); |
| 157 } | 159 } |
| OLD | NEW |