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

help.js « lib - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8323632b9b871e0f5f7dfa315ab4bbb3ef57b34b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14

var fs = require("./utils/graceful-fs")
  , path = require("path")
  , exec = require("./utils/exec")

module.exports = help

function help (args, cb) {
  var section = args.shift() || "help"
  fs.stat(path.join(__dirname, "../man/"+section+".1"), function (e, o) {
    if (e) return cb(new Error("Help section not found: "+section))
    exec("man", [path.join(__dirname, "../man/"+section+".1")], cb)
  })
}