pub fn build_install_command(
item: &PackageItem,
password: Option<&str>,
dry_run: bool,
) -> (String, bool)Expand description
What: Build a shell command to install item and indicate whether sudo is used.
Input:
item: Package to install (official via pacman, AUR via helper).password: Optional sudo password; when present, wiressudo -Swith a pipe.dry_run: Whentrue, prints the command instead of executing.
Output:
- Tuple
(command_string, uses_sudo)with a shell-ready command and whether it requires sudo.
Details:
- Uses
--neededflag for new installs, omits it for reinstalls. - Adds a hold tail so spawned terminals remain open after completion.