From f0346f75490619a81b310bfc18646ae5ae2e0ea4 Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 19 Aug 2019 13:42:24 -0700 Subject: [PATCH] cacache@12.0.3 --- node_modules/cacache/CHANGELOG.md | 9 +++++++++ node_modules/cacache/lib/util/fix-owner.js | 8 +++++++- node_modules/cacache/package.json | 20 ++++++++++---------- package-lock.json | 6 +++--- package.json | 2 +- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/node_modules/cacache/CHANGELOG.md b/node_modules/cacache/CHANGELOG.md index de84bdbf13216..f67fbc8b4ec9e 100644 --- a/node_modules/cacache/CHANGELOG.md +++ b/node_modules/cacache/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [12.0.3](https://github.com/npm/cacache/compare/v12.0.2...v12.0.3) (2019-08-19) + + +### Bug Fixes + +* do not chown if not running as root ([2d80af9](https://github.com/npm/cacache/commit/2d80af9)) + + + ### [12.0.2](https://github.com/npm/cacache/compare/v12.0.1...v12.0.2) (2019-07-19) diff --git a/node_modules/cacache/lib/util/fix-owner.js b/node_modules/cacache/lib/util/fix-owner.js index c91c709d9586b..f5c33db5f0adc 100644 --- a/node_modules/cacache/lib/util/fix-owner.js +++ b/node_modules/cacache/lib/util/fix-owner.js @@ -37,9 +37,15 @@ function fixOwner (cache, filepath) { // This platform doesn't need ownership fixing return BB.resolve() } + + getSelf() + if (self.uid !== 0) { + // almost certainly can't chown anyway + return BB.resolve() + } + return BB.resolve(inferOwner(cache)).then(owner => { const { uid, gid } = owner - getSelf() // No need to override if it's already what we used. if (self.uid === uid && self.gid === gid) { diff --git a/node_modules/cacache/package.json b/node_modules/cacache/package.json index 1df72c2d7db6f..aa20092ccc9a1 100644 --- a/node_modules/cacache/package.json +++ b/node_modules/cacache/package.json @@ -1,19 +1,19 @@ { - "_from": "cacache@12.0.2", - "_id": "cacache@12.0.2", + "_from": "cacache@12.0.3", + "_id": "cacache@12.0.3", "_inBundle": false, - "_integrity": "sha512-ifKgxH2CKhJEg6tNdAwziu6Q33EvuG26tYcda6PT3WKisZcYDXsnEdnRv67Po3yCzFfaSoMjGZzJyD2c3DT1dg==", + "_integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", "_location": "/cacache", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "cacache@12.0.2", + "raw": "cacache@12.0.3", "name": "cacache", "escapedName": "cacache", - "rawSpec": "12.0.2", + "rawSpec": "12.0.3", "saveSpec": null, - "fetchSpec": "12.0.2" + "fetchSpec": "12.0.3" }, "_requiredBy": [ "#USER", @@ -21,9 +21,9 @@ "/make-fetch-happen", "/pacote" ], - "_resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.2.tgz", - "_shasum": "8db03205e36089a3df6954c66ce92541441ac46c", - "_spec": "cacache@12.0.2", + "_resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", + "_shasum": "be99abba4e1bf5df461cd5a2c1071fc432573390", + "_spec": "cacache@12.0.3", "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Kat Marchán", @@ -125,5 +125,5 @@ "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" }, - "version": "12.0.2" + "version": "12.0.3" } diff --git a/package-lock.json b/package-lock.json index 219e57cb25e26..b569680e11743 100644 --- a/package-lock.json +++ b/package-lock.json @@ -556,9 +556,9 @@ "integrity": "sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw==" }, "cacache": { - "version": "12.0.2", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.2.tgz", - "integrity": "sha512-ifKgxH2CKhJEg6tNdAwziu6Q33EvuG26tYcda6PT3WKisZcYDXsnEdnRv67Po3yCzFfaSoMjGZzJyD2c3DT1dg==", + "version": "12.0.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.3.tgz", + "integrity": "sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw==", "requires": { "bluebird": "^3.5.5", "chownr": "^1.1.1", diff --git a/package.json b/package.json index 31efce14f9e25..417a1370bf7f6 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "bin-links": "^1.1.3", "bluebird": "^3.5.5", "byte-size": "^5.0.1", - "cacache": "^12.0.2", + "cacache": "^12.0.3", "call-limit": "^1.1.1", "chownr": "^1.1.2", "ci-info": "^2.0.0",