From 3b811237cb467b749de0b2743dfe75a9ad3020d9 Mon Sep 17 00:00:00 2001 From: Matt Saladna Date: Sat, 9 Dec 2023 19:30:19 -0500 Subject: [PATCH] Drop same-owner on extraction --- nvm.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nvm.sh b/nvm.sh index 95d165df95..c8c3c8ad12 100644 --- a/nvm.sh +++ b/nvm.sh @@ -2384,12 +2384,12 @@ nvm_extract_tarball() { if [ "${NVM_OS}" = 'openbsd' ]; 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 - 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 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 }