diff --git a/bin/omarchy-sudo-passwordless b/bin/omarchy-sudo-passwordless index 58a9b15c..b5f88a94 100755 --- a/bin/omarchy-sudo-passwordless +++ b/bin/omarchy-sudo-passwordless @@ -86,7 +86,9 @@ with_root_lock() { exec {fd}>"$LOCK_FILE" || return 1 /usr/bin/chown root:root "$LOCK_FILE" || return 1 /usr/bin/chmod 0600 "$LOCK_FILE" || return 1 - /usr/bin/flock -x "$fd" || return 1 + # Grant operations are short. A stalled holder must not hang a caller + # indefinitely, least of all pacman's pre-transaction hook. + /usr/bin/flock -x -w 60 "$fd" || return 1 "$@" || rc=$? /usr/bin/flock -u "$fd" || rc=1 exec {fd}>&-