blob: 5ade87f6429f6350aa9a5e76c53f591d2b728324 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
const BaseCommand = require('./base-command.js')
class Prefix extends BaseCommand {
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get name () {
return 'prefix'
}
/* istanbul ignore next - see test/lib/load-all-commands.js */
static get usage () {
return ['[-g]']
}
exec (args, cb) {
this.prefix(args).then(() => cb()).catch(cb)
}
async prefix (args) {
return this.npm.output(this.npm.prefix)
}
}
module.exports = Prefix
|