cacache 12.0.2 → 12.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/lib/util/fix-owner.js +7 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
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.
|
|
4
4
|
|
|
5
|
+
### [12.0.3](https://github.com/npm/cacache/compare/v12.0.2...v12.0.3) (2019-08-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* do not chown if not running as root ([2d80af9](https://github.com/npm/cacache/commit/2d80af9))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
5
14
|
### [12.0.2](https://github.com/npm/cacache/compare/v12.0.1...v12.0.2) (2019-07-19)
|
|
6
15
|
|
|
7
16
|
|
package/lib/util/fix-owner.js
CHANGED
|
@@ -37,9 +37,15 @@ function fixOwner (cache, filepath) {
|
|
|
37
37
|
// This platform doesn't need ownership fixing
|
|
38
38
|
return BB.resolve()
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
getSelf()
|
|
42
|
+
if (self.uid !== 0) {
|
|
43
|
+
// almost certainly can't chown anyway
|
|
44
|
+
return BB.resolve()
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
return BB.resolve(inferOwner(cache)).then(owner => {
|
|
41
48
|
const { uid, gid } = owner
|
|
42
|
-
getSelf()
|
|
43
49
|
|
|
44
50
|
// No need to override if it's already what we used.
|
|
45
51
|
if (self.uid === uid && self.gid === gid) {
|