Skip to content

Commit 3b81123

Browse files
committed
Drop same-owner on extraction
1 parent ad4fa37 commit 3b81123

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nvm.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -2384,12 +2384,12 @@ nvm_extract_tarball() {
23842384

23852385
if [ "${NVM_OS}" = 'openbsd' ]; then
23862386
if [ "${tar_compression_flag}" = 'J' ]; then
2387-
command xzcat "${TARBALL}" | "${tar}" -xf - -C "${TMPDIR}" -s '/[^\/]*\///' || return 1
2387+
command xzcat "${TARBALL}" | "${tar}" --no-same-owner -xf - -C "${TMPDIR}" -s '/[^\/]*\///' || return 1
23882388
else
2389-
command "${tar}" -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" -s '/[^\/]*\///' || return 1
2389+
command "${tar}" --no-same-owner -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" -s '/[^\/]*\///' || return 1
23902390
fi
23912391
else
2392-
command "${tar}" -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" --strip-components 1 || return 1
2392+
command "${tar}" --no-same-owner -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" --strip-components 1 || return 1
23932393
fi
23942394
}
23952395

0 commit comments

Comments
 (0)