build_downgrade_command_for_executor

Function build_downgrade_command_for_executor 

Source
pub fn build_downgrade_command_for_executor(
    names: &[String],
    _password: Option<&str>,
    dry_run: bool,
) -> String
Expand description

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

Inputs:

  • names: Package names to downgrade.
  • _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:

  • Uses the downgrade tool to downgrade packages.
  • Checks if downgrade tool is available before executing.
  • Password is written to PTY stdin when sudo prompts, so we don’t need to pipe it here.
  • Removes hold tail since we’re not spawning a terminal.