Skip to main content

build_install_command

Function build_install_command 

Source
pub fn build_install_command(
    item: &PackageItem,
    password: Option<&str>,
    dry_run: bool,
) -> Result<(String, bool), String>
Expand description

What: Build a shell command to install one package from a neutral toolkit plan.

Inputs:

  • item: Package to install.
  • password: Optional privilege password for Pacsea’s existing sudo session policy.
  • dry_run: Whether to display rather than execute the plan.

Output:

  • Shell command and whether the operation uses a privilege tool.

§Errors

Returns an actionable error when package validation, toolkit planning, or privilege resolution fails.

Details:

  • arch-toolkit validates operands and inserts --; Pacsea retains privilege/password, dry-run, PTY, hold-tail, and execution ownership. AUR helpers are never privilege-wrapped.