Drop same-owner on extraction

This commit is contained in:
Matt Saladna 2023-12-09 19:30:19 -05:00
parent ad4fa37deb
commit 3b811237cb
No known key found for this signature in database
GPG Key ID: ED68223DE93752A9

6
nvm.sh
View File

@ -2384,12 +2384,12 @@ nvm_extract_tarball() {
if [ "${NVM_OS}" = 'openbsd' ]; then if [ "${NVM_OS}" = 'openbsd' ]; then
if [ "${tar_compression_flag}" = 'J' ]; then if [ "${tar_compression_flag}" = 'J' ]; then
command xzcat "${TARBALL}" | "${tar}" -xf - -C "${TMPDIR}" -s '/[^\/]*\///' || return 1 command xzcat "${TARBALL}" | "${tar}" --no-same-owner -xf - -C "${TMPDIR}" -s '/[^\/]*\///' || return 1
else else
command "${tar}" -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" -s '/[^\/]*\///' || return 1 command "${tar}" --no-same-owner -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" -s '/[^\/]*\///' || return 1
fi fi
else else
command "${tar}" -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" --strip-components 1 || return 1 command "${tar}" --no-same-owner -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" --strip-components 1 || return 1
fi fi
} }