mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
289 B
15 lines
289 B
13 years ago
|
#!/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)
|
||
|
})
|