Aborting `rake` execution needlessly dumps a backtrace
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 2.5k
- Forks
- 650
- Avg merge
- 6m
- Merged PRs (30d)
- 3
Description
When aborting rake with Ctrl+C, it outputs rake aborted! then dumps a long backtrace. This seems unnecessary, as aborting isn't really an unexpected outcome of pressing Ctrl+C (or sending an INT signal).
I'd like to propose catching the Interrupt exception and exiting cleanly (with an exit code of 1). We can still print the backtrace if the --trace option is used.
I can submit a pull request, if this seems reasonable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating rake's command-line handling for Ctrl+C or the Interrupt exception, then inspect how the --trace option affects error output. Reproduce the current behavior with a representative rake invocation; done means Ctrl+C exits with status 1 without a backtrace by default, while --trace retains the backtrace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100