diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e83aa7ad9..e3d013306d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,10 @@ Please visit [cucumber/CONTRIBUTING.md](https://github.com/cucumber/cucumber/blo ([#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 ### Improved diff --git a/lib/cucumber/cli/main.rb b/lib/cucumber/cli/main.rb index 98ee60de75..419243da3a 100644 --- a/lib/cucumber/cli/main.rb +++ b/lib/cucumber/cli/main.rb @@ -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