Skip to main content

aur_update_shell_fallback

Function aur_update_shell_fallback 

Source
pub fn aur_update_shell_fallback(noconfirm: bool) -> String
Expand description

What: Build a shell body that updates AUR packages with runtime helper fallback.

Inputs:

  • noconfirm: Pass --noconfirm for non-interactive updates.

Output:

  • A POSIX shell snippet running paru -Sua / yay -Sua, or printing NO_AUR_HELPER_MESSAGE when neither helper exists.

Details:

  • Shell-time counterpart of build_aur_update_command, for callers that spawn the update in an external terminal (Pacsea’s system-update flow).
  • Takes no package operands, so no -- terminator is emitted.
  • The no-helper branch writes to stderr and exits the subshell with 127.

§Example

use arch_toolkit::install::aur_update_shell_fallback;

let body = aur_update_shell_fallback(true);
assert!(body.contains("paru -Sua --noconfirm"));