pub fn build_install_command_for_executor(
items: &[PackageItem],
password: Option<&str>,
dry_run: bool,
) -> Result<String, 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
PTYexecution (no hold tail).
Details:
- Groups official and
AURpackages separately; mixed installs runpacmanthenparu/yaywith--auron AUR-only names. - Uses
--noconfirmfor non-interactive execution. - Always uses
sudo -Sfor official packages (password written to PTY stdin when sudo prompts). - Removes hold tail since we’re not spawning a terminal.
§Errors
Returns Err when the configured privilege tool cannot be resolved for official package paths.