diff --git a/installation.sh b/installation.sh index 7d478af..c1b2636 100644 --- a/installation.sh +++ b/installation.sh @@ -333,8 +333,8 @@ EOF # Validate the temporary file if sudo visudo -c -f /tmp/sudoers_additions; then - # Append to sudoers if valid - sudo cat /tmp/sudoers_additions >> "$SUDOERS_FILE" + # Append to sudoers if valid using tee with sudo + cat /tmp/sudoers_additions | sudo EDITOR='tee -a' visudo >/dev/null 2>&1 print_success "Sudo authorization added" else print_error "Failed to add sudo rules - syntax validation failed"