yay icon indicating copy to clipboard operation
yay copied to clipboard

Inconsistent privilege escalation for systemd daemon-reload operation

Open Appryhandsome opened this issue 1 year ago • 1 comments

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

  1. Run yay -Syu (without sudo)
  2. Allow the system update to proceed
  3. 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.

Appryhandsome avatar Nov 30 '24 19:11 Appryhandsome

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.

stale[bot] avatar Apr 25 '25 01:04 stale[bot]