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

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorKat Marchán <kzm@zkat.tech>2018-04-04 01:50:59 +0300
committerKat Marchán <kzm@zkat.tech>2018-04-04 03:58:19 +0300
commitada9c6c12761e49be9b49ab76b51a176020a0408 (patch)
tree5b36cf666a9da4a5cf7fed24bb29597120bd910b /bin
parent77c3f7a0091f689661f61182cd361465e2d695d5 (diff)
cli: fix easter egg (#20214)
PR-URL: https://github.com/npm/npm/pull/20214 Credit: @zkat
Diffstat (limited to 'bin')
-rwxr-xr-xbin/npm-cli.js21
1 files changed, 17 insertions, 4 deletions
diff --git a/bin/npm-cli.js b/bin/npm-cli.js
index e73ad028a..6e66cbd69 100755
--- a/bin/npm-cli.js
+++ b/bin/npm-cli.js
@@ -35,7 +35,6 @@
var npm = require('../lib/npm.js')
var npmconf = require('../lib/config/core.js')
var errorHandler = require('../lib/utils/error-handler.js')
- var output = require('../lib/utils/output.js')
var configDefs = npmconf.defs
var shorthands = configDefs.shorthands
@@ -82,9 +81,23 @@
npm.load(conf, function (er) {
if (er) return errorHandler(er)
npm.commands[npm.command](npm.argv, function (err) {
- // https://www.youtube.com/watch?v=7nfPu8qTiQU
- if (!err && npm.config.get('ham-it-up') && !npm.config.get('json') && !npm.config.get('parseable') && npm.command !== 'completion') {
- output('\n 🎵 I Have the Honour to Be Your Obedient Servant,🎵 ~ npm 📜🖋\n')
+ // https://genius.com/Lin-manuel-miranda-your-obedient-servant-lyrics
+ if (
+ !err &&
+ npm.config.get('ham-it-up') &&
+ !npm.config.get('json') &&
+ !npm.config.get('parseable') &&
+ npm.command !== 'completion'
+ ) {
+ console.error(
+ `\n ${
+ npm.config.get('unicode') ? '🎵 ' : ''
+ } I Have the Honour to Be Your Obedient Servant,${
+ npm.config.get('unicode') ? '🎵 ' : ''
+ } ~ npm ${
+ npm.config.get('unicode') ? '📜🖋 ' : ''
+ }\n`
+ )
}
errorHandler.apply(this, arguments)
})