Skip to content

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

Description

@vladshcherbin

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

Screen.Recording.2026-06-22.at.01.51.51.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status
    Needs triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions