fix sudo password

This commit is contained in:
2026-04-29 07:01:53 -06:00
parent 0618ab178a
commit 46a708c962

View File

@@ -27,6 +27,11 @@ set -e
# Ask for sudo password upfront so subsequent sudo calls don't prompt mid-install
sudo -v
# Grant passwordless sudo for the duration of the install, revoke on exit
echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/99-hampack-install > /dev/null
sudo chmod 440 /etc/sudoers.d/99-hampack-install
trap "sudo rm -f /etc/sudoers.d/99-hampack-install" EXIT
# Ensure git is available before attempting to clone anything
if ! command -v git &> /dev/null; then
echo "Installing git..."