From 6250b5f995f2914c9ea6b1f0922a686a183d15c1 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sat, 20 Apr 2024 03:18:10 -0300 Subject: [PATCH] Call chmod after 'git pull' Similar to clone, the umask is not honored. Fix with recursive chmod. --- libexec/portzap/portzap-pull | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libexec/portzap/portzap-pull b/libexec/portzap/portzap-pull index dbbaaba..a02b72f 100755 --- a/libexec/portzap/portzap-pull +++ b/libexec/portzap/portzap-pull @@ -51,8 +51,9 @@ cd "${gitdir}" remote=$("${git}" remote | head -n1) if [ "$(git branch --show-current)" != "${branch}" ]; then change_branch "${remote}" "${branch}" - echo "[-] Adjust filemode. This might take a while" - doas -u root /bin/chmod -R "${mode}" "${gitdir}" fi set -x doas -u _portzap "${git}" pull --rebase "${remote}" "${branch}" +set +x +echo "[-] Adjust filemode. This might take a while" +doas -u root /bin/chmod -R "${mode}" "${gitdir}"