aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-27 15:28:28 -0400
committerCraig Jennings <c@cjennings.net>2026-06-27 15:28:28 -0400
commit263b52dc4a5b4584dab24969efadebf806b30440 (patch)
tree8d4dd7f790d84ccf9c95ff3ab629bc385312fc4e
parentc0b14c7db978ec44150637c80bf7228983bea061 (diff)
downloadarchsetup-263b52dc4a5b4584dab24969efadebf806b30440.tar.gz
archsetup-263b52dc4a5b4584dab24969efadebf806b30440.zip
fix: log the granting-permissions step on sudoers write failure
create_user announced "granting permissions" with a bare display call that never set $action, so a failed sudoers write fell back to error_warn "$action" and logged the stale "creating user and home directory" from an earlier step. I set action at that step so a failure names the operation that actually failed. It was the only stale-$action site in the script (the rest set action adjacently before their error_warn).
-rwxr-xr-xarchsetup2
1 files changed, 1 insertions, 1 deletions
diff --git a/archsetup b/archsetup
index 5577476..264ea0f 100755
--- a/archsetup
+++ b/archsetup
@@ -1084,7 +1084,7 @@ create_user() {
mkdir -p "/home/$username/.cache/zsh/"
# give $username sudo nopasswd rights (required for aur installs)
- display "task" "granting permissions"
+ action="granting permissions" && display "task" "$action"
backup_system_file /etc/sudoers
(echo "%$username ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers) \
|| error_warn "$action" "$?"