MCPcopy Create free account
hub / github.com/encodeous/nylon / Exec

Function Exec

core/sys_utils.go:15–22  ·  view source on GitHub ↗
(logger *slog.Logger, name string, arg ...string)

Source from the content-addressed store, hash-verified

13}
14
15func Exec(logger *slog.Logger, name string, arg ...string) error {
16 out, err := exec.Command(name, arg...).CombinedOutput()
17 logger.Debug("exec command", "cmd", name, "arg", arg, "out", string(out))
18 if err != nil {
19 return fmt.Errorf("error executing command: %s %s. %w. Output: %s", name, arg, err, out)
20 }
21 return nil
22}

Callers 14

ExecSplitFunction · 0.85
ConfigureAliasFunction · 0.85
RemoveAliasFunction · 0.85
ConfigureRouteFunction · 0.85
RemoveRouteFunction · 0.85
InitInterfaceFunction · 0.85
ConfigureAliasFunction · 0.85
RemoveAliasFunction · 0.85
ConfigureRouteFunction · 0.85
RemoveRouteFunction · 0.85
ConfigureAliasFunction · 0.85
RemoveAliasFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected