mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 14:21:50 +00:00
Drop same-owner on extraction
This commit is contained in:
parent
ad4fa37deb
commit
3b811237cb
6
nvm.sh
6
nvm.sh
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user