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

Unified Diff: utils/pub/command_update.dart

Issue 10340005: Add support for pub install. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: utils/pub/command_update.dart
diff --git a/utils/pub/command_update.dart b/utils/pub/command_update.dart
index a348f3f9a082dc69c2d0a2912e74b55275f3a6ba..76863130f156b5b5928fb2daf8a86eade533666f 100644
--- a/utils/pub/command_update.dart
+++ b/utils/pub/command_update.dart
@@ -3,28 +3,9 @@
// BSD-style license that can be found in the LICENSE file.
/** Handles the `update` pub command. */
-class UpdateCommand extends PubCommand {
+// TODO(nweiz): Make update do something different than install when we have
+// sources for which that makes sense.
+class UpdateCommand extends InstallCommand {
String get description() =>
"update the current package's dependencies to the latest versions";
-
- void onRun() {
- var entrypoint;
- var packagesDir;
- var dependencies;
-
- getWorkingPackage().chain((package) {
- entrypoint = package;
- return package.traverseDependencies(cache);
- }).chain((packages) {
- dependencies = packages;
- // TODO(rnystrom): Make this path configurable.
- packagesDir = join(entrypoint.dir, 'packages');
- return cleanDir(packagesDir);
- }).then((dir) {
- // Symlink each dependency.
- for (final package in dependencies) {
- createSymlink(package.dir, join(packagesDir, package.name));
- }
- });
- }
}
« utils/pub/app_cache.dart ('K') | « utils/pub/command_list.dart ('k') | utils/pub/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698