mirror of https://github.com/nodejs/node.git
15 lines
289 B
JavaScript
Executable File
15 lines
289 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
var which = require("../")
|
|
if (process.argv.length < 3) {
|
|
console.error("Usage: which <thing>")
|
|
process.exit(1)
|
|
}
|
|
|
|
which(process.argv[2], function (er, thing) {
|
|
if (er) {
|
|
console.error(er.message)
|
|
process.exit(er.errno || 127)
|
|
}
|
|
console.log(thing)
|
|
})
|