build_install_command_for_executor

Function build_install_command_for_executor 

Source
pub fn build_install_command_for_executor(
    items: &[PackageItem],
    password: Option<&str>,
    dry_run: bool,
) -> String
Expand description

What: Build install command string without hold tail for PTY execution.

Inputs:

  • items: Packages to install.
  • _password: Optional sudo password (unused - password is written to PTY stdin when sudo prompts).
  • dry_run: Whether to run in dry-run mode.

Output:

  • Command string ready for PTY execution (no hold tail).

Details:

  • Groups official and AUR packages separately.
  • Uses --noconfirm for non-interactive execution.
  • Always uses sudo -S for official packages (password written to PTY stdin when sudo prompts).
  • Removes hold tail since we’re not spawning a terminal.