Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
Fix #342. Clean unpublished stuff out of local cache.
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Nov 2, 2010
1 parent 005e23e commit a10f758
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/unpublish.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = unpublish

var registry = require("./utils/registry")
, log = require("./utils/log")
, npm = require("../npm")

unpublish.usage = "npm unpublish <project>[@<version>]"

Expand All @@ -11,5 +12,8 @@ function unpublish (args, cb) {
, project = thing.shift()
, version = thing.join("@")
if (!project) return cb("Usage:\n"+unpublish.usage)
registry.unpublish(project, version, cb)
// remove from the cache first
npm.commands.cache(["clean", project, version], function (er) {
registry.unpublish(project, version, cb)
})
}

0 comments on commit a10f758

Please sign in to comment.