Skip to content

Commit

Permalink
Merge pull request #12886 from koic/suppress_interrupt_exception_for_lsp
Browse files Browse the repository at this point in the history
Suppress `Interrupt` exception for LSP
  • Loading branch information
koic committed May 7, 2024
2 parents 9e9caa6 + 1ec4ef9 commit 9845aff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/rubocop/cli.rb
Expand Up @@ -57,6 +57,10 @@ def run(args = ARGV)
rescue RuboCop::Error => e
warn Rainbow("Error: #{e.message}").red
STATUS_ERROR
rescue Interrupt
warn ''
warn 'Exiting...'
STATUS_INTERRUPTED
rescue Finished
STATUS_SUCCESS
rescue OptionParser::InvalidOption => e
Expand Down

0 comments on commit 9845aff

Please sign in to comment.