{"record":{"id":"799646477856712f","repo":"yorukot/superfile","slug":"unexpected-error-in-command-execution-w","errorCode":null,"errorMessage":"unexpected Error in command execution : %w","messagePattern":"unexpected Error in command execution : %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/utils/shell_utils.go","lineNumber":48,"sourceCode":"\n\tcmd := exec.CommandContext(ctx, baseCmd, args...)\n\tcmd.Dir = cmdDir\n\tDetachFromTerminal(cmd)\n\toutputBytes, err := cmd.CombinedOutput()\n\tretCode := -1\n\n\tif errors.Is(ctx.Err(), context.DeadlineExceeded) {\n\t\tslog.Error(\"User's command timed out\", \"outputBytes\", outputBytes,\n\t\t\t\"cmd error\", err, \"ctx error\", ctx.Err())\n\t\treturn retCode, string(outputBytes), ctx.Err()\n\t}\n\n\tif err == nil {\n\t\tretCode = 0\n\t} else if exitErr, ok := err.(*exec.ExitError); ok { //nolint: errorlint // We dont expect error to be Wrapped here\n\t\tretCode = exitErr.ExitCode()\n\t} else {\n\t\terr = fmt.Errorf(\"unexpected Error in command execution : %w\", err)\n\t}\n\n\treturn retCode, string(outputBytes), err\n}\n","sourceCodeStart":30,"sourceCodeEnd":53,"githubUrl":"https://github.com/yorukot/superfile/blob/b72f550bc6e75913f48eb49fdd258e1a2df2fe88/src/pkg/utils/shell_utils.go#L30-L53","documentation":"Error \"unexpected Error in command execution : %w\" thrown in yorukot/superfile.","triggerScenarios":"Thrown at src/pkg/utils/shell_utils.go:48 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b72f550bc6e75913f48eb49fdd258e1a2df2fe88","analyzedAt":"2026-09-01T04:38:08.254Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}