summaryrefslogtreecommitdiff
path: root/deps/npm/lib/commands/get.js
blob: 7583ade23d600adc37da9ce63ffb7a4cf69db267 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const BaseCommand = require('../base-command.js')

class Get extends BaseCommand {
  static description = 'Get a value from the npm configuration'
  static name = 'get'
  static usage = ['[<key> ...] (See `npm config`)']

  // TODO
  /* istanbul ignore next */
  async completion (opts) {
    const config = await this.npm.cmd('config')
    return config.completion(opts)
  }

  async exec (args) {
    return this.npm.exec('config', ['get'].concat(args))
  }
}
module.exports = Get