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
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2011-06-05 00:32:15 +0400
committerisaacs <i@izs.me>2011-06-05 00:32:15 +0400
commit85edcfa96296e2c691db951f539b3619c04544c4 (patch)
tree67b1e50674647c91843b249b1c66dad4feed6846 /lib/build.js
parent7f8a64b18c6dbd96421cf56219cf37214f0c2e17 (diff)
Close #1000 Parseable output for link and build
Diffstat (limited to 'lib/build.js')
-rw-r--r--lib/build.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/build.js b/lib/build.js
index 88f143764..3797eef63 100644
--- a/lib/build.js
+++ b/lib/build.js
@@ -134,8 +134,12 @@ function linkBins (pkg, folder, parent, gtop, cb) {
// bins should always be executable.
fs.chmod(path.resolve(folder, pkg.bin[b]), 0755, function (er) {
if (er || !gtop) return cb(er)
- output.write( path.resolve(binRoot, b)+" -> "
- + path.resolve(folder, pkg.bin[b]), cb)
+ var dest = path.resolve(binRoot, b)
+ , src = path.resolve(folder, pkg.bin[b])
+ , out = npm.config.get("parseable")
+ ? dest + "::" + src + ":BINFILE"
+ : dest + " -> " + src
+ output.write(out, cb)
})
})
}, cb)