Skip to content
This repository was archived by the owner on Jul 3, 2019. It is now read-only.

Commit d49bbcd

Browse files
committed
fix(fix-owner): throw away ENOENTs on chownr
This is a race npm has run into before. I am not sure how to reproduce such a thing with cacache, but tbh if a directory or file disappears mid-chown, I could care less? Furthermore, if the file/directory's existence actually matters, this will almost certainly error elsewhere. It's fine for us to drop files on the floor though.
1 parent d8184fc commit d49bbcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util/fix-owner.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function fixOwner (filepath, uid, gid) {
2727
filepath,
2828
typeof uid === 'number' ? uid : process.getuid(),
2929
typeof gid === 'number' ? gid : process.getgid()
30-
)
30+
).catch({code: 'ENOENT'}, () => null)
3131
)
3232
}
3333

0 commit comments

Comments
 (0)