Permalink
Browse files

Only do bindist if it's got a build step

  • Loading branch information...
1 parent 6deac97 commit 79886804fed692b2ec80a6b22af8c264b228afac @isaacs isaacs committed Mar 30, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/publish.js
View
@@ -35,7 +35,12 @@ function publish (args, isRetry, cb) {
+"Remove the 'private' field from the package.json to publish it."))
// pre-build
- preBuild(data, npm.config.get("bindist"), function (er, tb) {
+ var bd = data.scripts
+ && ( data.scripts.preinstall
+ || data.scripts.install
+ || data.scripts.postinstall )
+ && npm.config.get("bindist")
+ preBuild(data, bd, function (er, tb) {
if (er) return cb(er)
return regPublish(data, tb, isRetry, args, cb)
})

0 comments on commit 7988680

Please sign in to comment.