Browse files

Fix #2602 Invalidate package.json cache on unbuild

  • Loading branch information...
1 parent be298fc commit 8d12a0f4ace733e2b22ff27409338e60dca92a9c @isaacs isaacs committed Jul 5, 2012
View
2 lib/unbuild.js
@@ -43,6 +43,8 @@ function rmStuff (pkg, folder, cb) {
, gnm = npm.dir
, top = gnm === parent
+ readJson.cache.del(path.resolve(folder, "package.json"))
+
log.verbose([top, gnm, parent], "unbuild "+pkg._id)
asyncMap([rmBins, rmMans], function (fn, cb) {
fn(pkg, folder, parent, top, cb)
View
2 test/disabled/change-bin-1/bin/foo
@@ -0,0 +1,2 @@
+#!/bin/bash
+echo "foo"
View
3 test/disabled/change-bin-1/package.json
@@ -0,0 +1,3 @@
+{"name":"npm-test-change-bin"
+,"version":"1.2.3"
+,"directories":{"bin":"./bin"}}
View
2 test/disabled/change-bin-2/bin/bar
@@ -0,0 +1,2 @@
+#!/bin/bash
+echo "foo"
View
3 test/disabled/change-bin-2/package.json
@@ -0,0 +1,3 @@
+{"name":"npm-test-change-bin"
+,"version":"2.3.4"
+,"directories":{"bin":"./bin"}}

0 comments on commit 8d12a0f

Please sign in to comment.