Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

--cached support for update

  • Loading branch information...
commit e8d59b8fdcf79f01e3d3c9fc43732344294f8611 1 parent abe457d
Christoph Dorn cadorn authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/commands/update.js
6 lib/commands/update.js
View
@@ -9,6 +9,7 @@ var command = exports["update"] = new ARGS_PARSER();
command.help("Update package/program.");
command.arg(".../[package.json|program.json]").optional();
command.arg("DEPENDENCY");
+command.option("--cached").bool().help("Update from local cache if available (will not aggressively fetch latest remote info).");
command.option("-v", "--verbose").bool().help("Show verbose progress.");
command.helpful();
@@ -19,9 +20,10 @@ command.action(function (options) {
return;
}
- // Always default to 'latest'. If you don't want latest packages and only want to update packages
- // who's version declaration has changed (and no longer matches installed package) use `sm install`.
options.now = true;
+ if (options.cached) {
+ options.now = false;
+ }
PM.forProgramPath(basePath).then(function(pm) {
return pm.update(options);
Please sign in to comment.
Something went wrong with that request. Please try again.