Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2010-05-03 05:45:20 +0400
committerisaacs <i@izs.me>2010-05-03 05:45:20 +0400
commitcd037a1ec63998298118e00631a5916f6fa452a1 (patch)
treeadb22399a2dcc2ce820573d7e2157a6468363abc /lib
parent3d20f891f7d79a10ca5e605a843500ab58c35088 (diff)
Make build a bit more friendly, and informative.
Diffstat (limited to 'lib')
-rw-r--r--lib/build.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/build.js b/lib/build.js
index 90ec1761a..3df93eb81 100644
--- a/lib/build.js
+++ b/lib/build.js
@@ -20,6 +20,7 @@ var npm = require("../npm")
, lifecycle = require("./utils/lifecycle")
, readJson = require("./utils/read-json")
, ini = require("./utils/ini")
+ , sys = require("sys")
module.exports = build
@@ -36,15 +37,17 @@ function build (args, cb) {
})(args.shift())
}
var pkg = args[0]
+ if (!pkg) cb()
// if pkg isn't an object, then parse the package.json inside it, and build with that.
if (typeof pkg === "string") {
+ log(pkg, "build")
return readAndBuild(pkg, cb)
}
pkg = pkg && pkg._data || pkg
- if (!pkg) return cb(new Error("Invalid package data"))
+ if (!pkg) return cb(new Error("Invalid package data "+sys.inspect(pkg)))
var ROOT = npm.root
, npmdir = npm.dir