Skip to content

Commit 878fe41

Browse files
committed
feat(macos): prompt before skipping system config on sudo failure
1 parent 5df7d8b commit 878fe41

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

macos/setup.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,17 @@ main() {
160160
echo "Skipping system configuration (--no-sudo)"
161161
else
162162
echo "Configuring system defaults (requires sudo)..."
163-
sudo -v
164-
configure_system_defaults
163+
if sudo -v; then
164+
configure_system_defaults
165+
else
166+
echo ""
167+
printf "Skip system configuration and continue? [y/N]: "
168+
read -r choice < /dev/tty || choice=""
169+
case "$choice" in
170+
y|Y) echo "Skipping system configuration." ;;
171+
*) die "Setup aborted" ;;
172+
esac
173+
fi
165174
fi
166175
}
167176

0 commit comments

Comments
 (0)