Skip to content

Commit

Permalink
Drop same-owner on extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
msaladna committed Dec 10, 2023
1 parent ad4fa37 commit 3b81123
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 3b81123

Please sign in to comment.