MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / RunCmd

Function RunCmd

cli/pkg/common/sshremote.go:1171–1185  ·  view source on GitHub ↗
(cmd string, shell bool)

Source from the content-addressed store, hash-verified

1169}
1170
1171func RunCmd(cmd string, shell bool) []byte {
1172 if shell {
1173 out, err := exec.Command("bash", "-c", cmd).Output()
1174 if err != nil {
1175 log.Fatal(err)
1176 panic("some error found")
1177 }
1178 return out
1179 }
1180 out, err := exec.Command(cmd).Output()
1181 if err != nil {
1182 log.Fatal(err)
1183 }
1184 return out
1185}

Callers

nothing calls this directly

Calls 1

FatalMethod · 0.80

Tested by

no test coverage detected