Skip to content

fix: replace panic with exitError for OS-level failures in mainCmd#48

Closed
jonbaldie wants to merge 1 commit into
avito-tech:masterfrom
jonbaldie:fix/panic-to-error
Closed

fix: replace panic with exitError for OS-level failures in mainCmd#48
jonbaldie wants to merge 1 commit into
avito-tech:masterfrom
jonbaldie:fix/panic-to-error

Conversation

@jonbaldie
Copy link
Copy Markdown

Five panic(err) calls for normal OS errors (temp dir creation, mkdir, file copy, RemoveAll, and exec.Run) crashed go-mutesting with a raw stack trace instead of a readable message; they now print the error to stderr and exit cleanly so users know exactly what failed.

… main

Five panic calls for routine OS errors (MkdirTemp, MkdirAll, CopyFile,
RemoveAll, and exec.Run) crashed the tool with a raw stack trace instead
of a readable message; they now call exitError or return a non-zero exit
code so the user sees what went wrong.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jonbaldie
Copy link
Copy Markdown
Author

Superseded by #52 which combines this with the exec timeout fix, adds defer for tmpDir cleanup, and resolves the conflict between these two PRs.

@jonbaldie jonbaldie closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant