From 289028b46870347e2b614511bbb2f830c32f9573 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 28 Apr 2022 17:21:34 +0530 Subject: [PATCH] Prevent umask from interfering with tar file extraction Fixes #5025 --- shell-integration/ssh/kitty | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shell-integration/ssh/kitty b/shell-integration/ssh/kitty index f417035dd..26c4e67e4 100755 --- a/shell-integration/ssh/kitty +++ b/shell-integration/ssh/kitty @@ -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")