MCPcopy Create free account
hub / github.com/Mister-leo/fssh / runSudoCommand

Function runSudoCommand

cmd/fssh/setup_binary.go:74–82  ·  view source on GitHub ↗

runSudoCommand runs a command with sudo

(name string, args ...string)

Source from the content-addressed store, hash-verified

72
73// runSudoCommand runs a command with sudo
74func runSudoCommand(name string, args ...string) error {
75 cmdArgs := append([]string{name}, args...)
76 cmd := exec.Command("sudo", cmdArgs...)
77 cmd.Stdin = os.Stdin
78 cmd.Stdout = os.Stdout
79 cmd.Stderr = os.Stderr
80
81 return cmd.Run()
82}

Callers 1

ensureBinaryInstalledFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected