Skip to main content

build_privilege_command

Function build_privilege_command 

Source
pub fn build_privilege_command(tool: PrivilegeTool, command: &str) -> String
Expand description

What: Build a privilege-escalated command string.

Inputs:

  • tool: Resolved privilege tool.
  • command: The unprivileged command to wrap.

Output: Shell string like "sudo pacman -S foo" or "doas pacman -S foo".

Details: Simple prefix — does not handle password piping.