Skip to content

Commit

Permalink
cache: Add warning text about using temp cache for debugging (#21105)
Browse files Browse the repository at this point in the history
PR-URL: npm/npm#21105
Credit: @karanjthakkar
Reviewed-By: @zkat
  • Loading branch information
karanjthakkar authored and zkat committed Jun 28, 2018
1 parent 3924c72 commit 177cbb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function clean (args) {
}
const cachePath = path.join(npm.cache, '_cacache')
if (!npm.config.get('force')) {
return BB.reject(new Error("As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead.\n\nIf you're sure you want to delete the entire cache, rerun this command with --force."))
return BB.reject(new Error("As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead. On the other hand, if you're debugging an issue with the installer, you can use `npm install --cache /tmp/empty-cache` to use a temporary cache instead of nuking the actual one.\n\nIf you're sure you want to delete the entire cache, rerun this command with --force."))
}
// TODO - remove specific packages or package versions
return rm(cachePath)
Expand Down

0 comments on commit 177cbb4

Please sign in to comment.