pub fn build_remove_command_for_executor(
names: &[String],
password: Option<&str>,
cascade: CascadeMode,
dry_run: bool,
) -> StringExpand description
What: Build remove command string without hold tail for PTY execution.
Inputs:
names: Package names to remove.password: Optional sudo password (password is written to PTY stdin when sudo prompts).cascade: Cascade removal mode.dry_run: Whether to run in dry-run mode.
Output:
- Command string ready for
PTYexecution (no hold tail).
Details:
- Uses
-R,-Rs, or-Rnsbased on cascade mode. - Uses
--noconfirmfor non-interactive execution. - Always uses
sudo -Sfor remove operations (password written to PTY stdin when sudo prompts). - Removes hold tail since we’re not spawning a terminal.