Inconsistent privilege escalation for systemd daemon-reload operation
Description
When running yay -Syu, the application correctly prompts for sudo password when installing packages, but fails to handle privilege escalation for the systemd daemon-reload operation. This results in an error message:
( X/XX) Reloading system manager configuration...
Invalid operation 'daemon-reload'
error: command failed to execute correctly
Expected Behavior
- yay should handle privilege escalation for the daemon-reload operation similarly to how it handles package installations
- Either prompt for sudo password or use the existing sudo session if already running with sudo
Current Behavior
- yay fails to execute daemon-reload due to insufficient permissions
- Requires manual intervention (
sudo systemctl daemon-reload) to complete the operation properly - No password prompt is shown for this specific operation, unlike package installation steps
Steps to Reproduce
- Run
yay -Syu(without sudo) - Allow the system update to proceed
- When it reaches the daemon-reload step, observe the error
Workaround
Running sudo yay -Syu from the start prevents this issue, but is behaviour that should be avoided.
System Information
- OS: Arch Linux
- yay version: v12.4.2 - libalpm v15.0.0
- systemd version: 256 (256.8-2-arch)
Additional Notes This inconsistency in privilege handling could confuse users, as yay otherwise handles sudo requirements automatically throughout the update process.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.