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

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

var npm = require("./npm.js")
  , output = require("./utils/output.js")
  , log = require("./utils/log.js")

whoami.usage = "npm whoami\n(just prints the 'username' config)"

function whoami (args, cb) {
  var me = npm.config.get("username")
  if (!me) me = "Not authed.  Run 'npm adduser'"
  output.write(me, cb)
}