MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / firstFindingDescriptions

Function firstFindingDescriptions

tools/builtin.go:1701–1710  ·  view source on GitHub ↗
(findings []bashpkg.SecurityFinding, limit int)

Source from the content-addressed store, hash-verified

1699}
1700
1701func runShellCommand(ctx context.Context, command, cwd string, timeout time.Duration) (int, string) {
1702 return runArgvCommand(ctx, bashpkg.ShellArgv(command, ""), cwd, timeout, command)
1703}
1704
1705func runArgvCommand(ctx context.Context, argv []string, cwd string, timeout time.Duration, originalCommand string) (int, string) {
1706 if len(argv) == 0 {
1707 return -1, "Error executing command: empty argv"
1708 }
1709 if timeout <= 0 {
1710 return -1, fmt.Sprintf("Error: Command timed out after %ss.\n\nCommand: %s", formatPythonFloatSeconds(timeout), originalCommand)
1711 }
1712 cmdCtx, cancel := context.WithTimeout(ctx, timeout)
1713 defer cancel()

Callers 1

ExecuteMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected