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.list; | |
6 | |
7 import 'dart:collection'; | 5 import 'dart:collection'; |
8 | 6 |
9 import '../ascii_tree.dart' as tree; | 7 import '../ascii_tree.dart' as tree; |
10 import '../command.dart'; | 8 import '../command.dart'; |
11 import '../log.dart' as log; | 9 import '../log.dart' as log; |
12 import '../package.dart'; | 10 import '../package.dart'; |
13 import '../utils.dart'; | 11 import '../utils.dart'; |
14 | 12 |
15 /// Handles the `deps` pub command. | 13 /// Handles the `deps` pub command. |
16 class DepsCommand extends PubCommand { | 14 class DepsCommand extends PubCommand { |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 /// It's very unlikely that the lockfile won't be up-to-date with the pubspec, | 216 /// It's very unlikely that the lockfile won't be up-to-date with the pubspec, |
219 /// but it's possible, since [Entrypoint.assertUpToDate]'s modification time | 217 /// but it's possible, since [Entrypoint.assertUpToDate]'s modification time |
220 /// check can return a false negative. This fails gracefully if that happens. | 218 /// check can return a false negative. This fails gracefully if that happens. |
221 Package _getPackage(String name) { | 219 Package _getPackage(String name) { |
222 var package = entrypoint.packageGraph.packages[name]; | 220 var package = entrypoint.packageGraph.packages[name]; |
223 if (package != null) return package; | 221 if (package != null) return package; |
224 dataError('The pubspec.yaml file has changed since the pubspec.lock file ' | 222 dataError('The pubspec.yaml file has changed since the pubspec.lock file ' |
225 'was generated, please run "pub get" again.'); | 223 'was generated, please run "pub get" again.'); |
226 } | 224 } |
227 } | 225 } |
OLD | NEW |