diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-27 15:28:28 -0400 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-27 15:28:28 -0400 |
| commit | c84060a1b3f6b083b1fad390813dd94e5988b25e (patch) | |
| tree | 4e86a5bcd7c9368958d7fad85915e063cd49c5fb | |
| parent | 430e67cac68a2e40afd13661785d0b75490ece1e (diff) | |
| download | archsetup-c84060a1b3f6b083b1fad390813dd94e5988b25e.tar.gz archsetup-c84060a1b3f6b083b1fad390813dd94e5988b25e.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-x | archsetup | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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" "$?" |
