PR-URL: https://github.com/nodejs/node/pull/52767 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
15 lines
295 B
JavaScript
15 lines
295 B
JavaScript
const { output } = require('proc-log')
|
|
const BaseCommand = require('../base-cmd.js')
|
|
|
|
class Root extends BaseCommand {
|
|
static description = 'Display npm root'
|
|
static name = 'root'
|
|
static params = ['global']
|
|
|
|
async exec () {
|
|
output.standard(this.npm.dir)
|
|
}
|
|
}
|
|
|
|
module.exports = Root
|