Prevent umask from interfering with tar file extraction

Fixes #5025
This commit is contained in:
Kovid Goyal 2022-04-28 17:21:34 +05:30
parent 2b3be147e6
commit 289028b468
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -95,7 +95,10 @@ command mkdir -p "$install_dir"
printf "Downloading kitty from: \033[32m%s\033[m\n\n" "$url"
if [ "$OS" = "linux" ]; then
old_umask=$(umask)
umask 000
fetch "$url" | command tar -C "$install_dir" -xJof -
umask "$old_umask"
[ $? = 0 ] || die "Failed to download and install kitty"
else
tdir=$(command mktemp -d "$install_dir/tmp-for-dmg-XXXXXXXXXXXX")