Skip to main content

build_aur_update_command

Function build_aur_update_command 

Source
pub fn build_aur_update_command(
    helper: AurHelper,
    noconfirm: bool,
) -> CommandSpec
Expand description

What: Build an AUR-only update command (-Sua).

Inputs:

  • helper: The AUR helper to run the update with.
  • noconfirm: Pass --noconfirm for non-interactive updates.

Output:

  • CommandSpec like paru -Sua --noconfirm.

Details:

  • Updates AUR packages only, leaving official packages to a separate pacman -Syu step — mirroring Pacsea’s split system-update flow where the AUR step runs conditionally after the pacman step succeeds.
  • Must NOT be wrapped in with_privilege; helpers escalate internally.

§Example

use arch_toolkit::install::build_aur_update_command;
use arch_toolkit::types::install::AurHelper;

let spec = build_aur_update_command(AurHelper::Paru, true);
assert_eq!(spec.to_shell_string(), "paru -Sua --noconfirm");