diff options
author | Rebecca Turner <me@re-becca.org> | 2017-03-08 04:45:33 +0300 |
---|---|---|
committer | Kat Marchán <kzm@sykosomatic.org> | 2017-03-10 03:08:24 +0300 |
commit | c3b994b71565eb4f943cce890bb887d810e6e2d4 (patch) | |
tree | 3649bcb94effb32d98ab37ffb88ae5defaa92c9d /bin | |
parent | 46aa9bcae088740df86234fc199f7aef53b116df (diff) |
install: Use EXDEV aware move instead of rename (#15901)
This will allow moving across devices and moving when filesystems don't
support renaming directories full of files.
PR-URL: https://github.com/npm/npm/pull/15901
Credit: @iarna
Reviewed-By: @zkat
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/npm-cli.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/npm-cli.js b/bin/npm-cli.js index ce89eaacc..14937d64f 100755 --- a/bin/npm-cli.js +++ b/bin/npm-cli.js @@ -35,6 +35,7 @@ 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 @@ -80,6 +81,12 @@ conf._exit = true npm.load(conf, function (er) { if (er) return errorHandler(er) - npm.commands[npm.command](npm.argv, errorHandler) + npm.commands[npm.command](npm.argv, function (err) { + // https://www.youtube.com/watch?v=7nfPu8qTiQU + if (!err && npm.config.get('ham-it-up')) { + output('\n 🎵 I Have the Honour to Be Your Obedient Servant,🎵 ~ npm 📜🖋\n') + } + errorHandler.apply(this, arguments) + }) }) })() |