aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/lib/install/action
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/install/action')
-rw-r--r--deps/npm/lib/install/action/finalize.js2
-rw-r--r--deps/npm/lib/install/action/prepare.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/deps/npm/lib/install/action/finalize.js b/deps/npm/lib/install/action/finalize.js
index ba38e602f8..ded2350dff 100644
--- a/deps/npm/lib/install/action/finalize.js
+++ b/deps/npm/lib/install/action/finalize.js
@@ -90,6 +90,6 @@ module.exports = function (staging, pkg, log) {
module.exports.rollback = function (top, staging, pkg, next) {
const requested = pkg.package._requested || getRequested(pkg)
- if (requested.type === 'directory') return next()
+ if (requested && requested.type === 'directory') return next()
gentlyRm(pkg.realpath, false, top, next)
}
diff --git a/deps/npm/lib/install/action/prepare.js b/deps/npm/lib/install/action/prepare.js
index 771a2a9399..5e4333a5b5 100644
--- a/deps/npm/lib/install/action/prepare.js
+++ b/deps/npm/lib/install/action/prepare.js
@@ -11,8 +11,8 @@ module.exports = function (staging, pkg, log, next) {
// see https://github.com/npm/npm/issues/10074 for details
if (pkg.package && pkg.package.scripts && pkg.package.scripts.prepublish) {
prepublishWarning([
- 'As of npm@5, `prepublish` scripts will run only for `npm publish`.',
- '(In npm@4 and previous versions, it also runs for `npm install`.)',
+ 'As of npm@5, `prepublish` scripts are deprecated.',
+ 'Use `prepare` for build steps and `prepublishOnly` for upload-only.',
'See the deprecation note in `npm help scripts` for more information.'
])
}