From 1b55dcbb534b6ee822107aa1f5923473fdccc5ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Behrmann?= Date: Wed, 28 Aug 2024 16:46:06 +0200 Subject: [PATCH] install: don't preserve owner when extracting files This will result in errors when run as root in a user namespace without the capability to chown files. Since the owner of a file in a tar can be arbitrary and not be present in the system, the owner is uninteresting anyway. --- lib/install.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/install.js b/lib/install.js index 7196a31629..5674d5998f 100644 --- a/lib/install.js +++ b/lib/install.js @@ -212,6 +212,7 @@ async function install (gyp, argv) { file: tarPath, strip: 1, filter: isValid, + preserveOwner: false, onwarn, cwd: tarExtractDir }) @@ -235,6 +236,7 @@ async function install (gyp, argv) { strip: 1, cwd: tarExtractDir, filter: isValid, + preserveOwner: false, onwarn }) )