MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / RunWithOptionalSudo

Method RunWithOptionalSudo

agent/utils/cmd/cmdx.go:101–104  ·  view source on GitHub ↗
(name string, arg ...string)

Source from the content-addressed store, hash-verified

99}
100
101func (c *CommandHelper) RunWithOptionalSudo(name string, arg ...string) error {
102 commandName, commandArgs := WrapWithOptionalSudo(name, arg...)
103 return c.Run(commandName, commandArgs...)
104}
105
106func (c *CommandHelper) RunWithStdout(name string, arg ...string) (string, error) {
107 return c.run(name, arg...)

Callers 10

ChownRMethod · 0.80
ChmodRMethod · 0.80
ChmodRWithModeMethod · 0.80
ChownRPathsMethod · 0.80
ChmodRPathsMethod · 0.80
UpdatePingStatusFunction · 0.80
EnableIptablesForwardFunction · 0.80
UpdateSystemTimeFunction · 0.80
UpdateSystemTimeZoneFunction · 0.80
RestartMethod · 0.80

Calls 2

RunMethod · 0.95
WrapWithOptionalSudoFunction · 0.85

Tested by

no test coverage detected