Documentation
¶
Index ¶
- func Clear()
- func Elevate(password string)
- func ExecAndLogSudo(isRoot, noisy bool, exe string, args ...string) error
- func Run(binary string, args ...string) ([]string, error)
- func RunErr(binary string, args ...string) ([]string, []string, error)
- func RunErrSudo(isRoot bool, binary string, args ...string) ([]string, []string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Elevate ¶
func Elevate(password string)
Elevate elevates this functions runs the command "sudo -Sk -- echo", this forces sudo to re-authenticate and lets us enter the password to STDIN giving us the ability to run sudo commands
func ExecAndLogSudo ¶
ExecAndLogSudo executes an elevated command and logs the output.
* if we're root, the command is executed directly * if we're not root, the command is prefixed with "sudo"
- noisy determines if we should print the command to the user noisy isn't set to true by our copy caller, as it logs differently, but other callers set it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.