#573·clack

[Bug] Spinner does not run `onCancel` function on `Ctrl + C`

Author: vladshcherbinCreated Jun 21, 2026Updated Jul 5, 2026
Labelsbug

Environment

  • OS: macOS 15.7.7
  • Node Version: v26.1.0
  • Package: @clack/prompts
  • Package Version: v1.6.0

Describe the bug When spinner is spinning, Ctrl + C finishes the spinner with Cancelled message, but does not execute onCancel function

To Reproduce spinner-cancel example can be used as a reproduction

Steps to reproduce the behavior:

  • Use spinner-cancel example
  • Run the example
  • Press Ctrl + C

Expected behavior

onCancel should run and print note log

Additional Information

https://github.com/user-attachments/assets/26209b73-ba12-4409-973c-1fbcc1369354