Skip to content

Commit

Permalink
SIGINT trap consistent with TERM behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
akostadinov committed May 28, 2019
1 parent cacfed8 commit bd20169
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo
* Fix seed printed in cucumber UI to match the seed that was actually used.
([#1329](https://github.com/cucumber/cucumber-ruby/pull/1329)
[deivid-rodriguez](https://github.com/deivid-rodriguez))
* Make SIGINT/`Ctrl+c` behavior consistent with SIGTERM/`kill` behavior - now first invocation causes existing scenario to stop running and jump to `at_exit`, second invocation causes immediate exit. Before that first invocation only instructed Cucumber to exit after scenario and second invocation caused immediate exit skipping `at_exit`.
([#1353](https://github.com/cucumber/cucumber-ruby/pull/1353)
[akostadinov](https://github.com/akostadinov))

### Added

Expand Down
1 change: 1 addition & 0 deletions lib/cucumber/cli/main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def trap_interrupt
exit_unable_to_finish! if Cucumber.wants_to_quit
Cucumber.wants_to_quit = true
STDERR.puts "\nExiting... Interrupt again to exit immediately."
exit_unable_to_finish
end
end

Expand Down

0 comments on commit bd20169

Please sign in to comment.