Skip to content

fix(watch): exit quietly when watchexec is interrupted with Ctrl+C - #14541

Merged
jdx merged 1 commit into
mainfrom
claude/mise-plugin-discovery-6fda8c
Oct 16, 2026
Merged

jdx merged 1 commit into
mainfrom
claude/mise-plugin-discovery-6fda8c

Conversation

@jdx

@jdx jdx commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

https://entire.io/gh/jdx/mise/trails/790

Pressing Ctrl+C twice in mise watch no longer ends with an error banner. With watchexec 2.8.0 the second Ctrl+C makes watchexec exit with status 130 (128 + SIGINT), and mise reported that as a failure:

^Cmise ERROR command ["watchexec", "--clear", "--restart", "--", ".../mise", "run", "..."] exited with code 130
mise ERROR Version: 2026.10.11 linux-x64 (2026-10-15)
mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information

Now mise watch treats watchexec ending with exit status 130, or being killed by SIGINT, as the user interrupting it: it prints nothing and exits with 130. Any other non-zero status from watchexec is still an error, and a SIGTERM is not mistaken for Ctrl+C.

Reported in discussion #8269.

Validation

  • Added a unit test for the exit-status classification (130, SIGINT, success, generic failure, SIGTERM).
  • cargo clippy --workspace --all-targets -- -D warnings is clean.
  • No e2e test: reproducing it needs a pty and a watchexec that exits 130.

🤖 Generated with Claude Code

AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5; version: claude-code_2-1-299_agent.


Note

Low Risk
Narrow change to mise watch exit-status handling and UX; no auth, data, or security-sensitive paths.

Overview
mise watch no longer prints an error when watchexec stops because the user hit Ctrl+C (including watchexec 2.8’s exit code 130 after a second interrupt).

Watchexec is run with unchecked() so mise can read the exit status. A new interrupted_exit_code helper treats exit 130 and Unix SIGINT as a user interrupt and exits via request_exit(130) without the failure banner; other non-zero exits still fail with bail!, and SIGTERM is not treated as Ctrl+C. A Unix unit test covers the status classification.

Reviewed by Cursor Bugbot for commit 169aa27. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Entire-Checkpoint: 01M52GB953DCG0BQH08CZ5H0AV
@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 3 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2c3fbe3d-a761-4c7d-9f9d-1da17f5cb052
📥 Commits

Reviewing files that changed from the base of the PR and between c585c7a and 169aa27.

📒 Files selected for processing: 1
  • src/cli/watch.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

mise watch now exits quietly with status 130 when watchexec exits with 130 or dies from SIGINT.

  • Pressing Ctrl+C stops mise watch without an error banner.

Reviews (1) · Last reviewed commit: "fix(watch): exit quietly when watchexec ..." · Reviewed by Greptile

@jdx
jdx merged commit b672a03 into main Oct 16, 2026
52 of 54 checks passed
@jdx
jdx deleted the claude/mise-plugin-discovery-6fda8c branch October 16, 2026 14:44
@github-actions

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▁▄▃▇▅█▅▄▆▆▄ 28,023,431 → 28,002,723 -0.07% 20.09 → 19.87ms -1.07%
hook-env ▂█▁▆▂▅▇▂▄▅▅ 30,279,961 → 30,276,472 -0.01% 20.54 → 20.78ms +1.17%
ls ▁▇▄▅▆▅▆█▇▄▆ 32,200,440 → 32,219,586 +0.06% 21.83 → 22.04ms +0.95%
registry ▄▁▄▆█▇▆▄▇█▂ 40,366,185 → 40,306,775 -0.15% 18.40 → 17.84ms -3.03%
startup ▇█▁▃▂▃▂▂▂▂▂ 11,080,275 → 11,076,806 -0.03% 12.04 → 12.01ms -0.28%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

169aa27de154 vs c585c7a6c1fd · measured on the runner, not pushed to the history.

jdx pushed a commit that referenced this pull request Oct 17, 2026
<!-- entire-trail-link-start -->
https://entire.io/gh/jdx/mise/trails/781
<!-- entire-trail-link-end -->

### 🚀 Features

- **(bootstrap)** template repo url and ref, add clone options by @jdx
in [#14548](#14548)
- **(ls-remote)** list every version range of a registry tool by @jdx in
[#14544](#14544)
- **(registry)** let one backend carry different options per version
range by @jdx in [#14543](#14543)
- **(vfox)** allow a headers table in the PreInstall result by @jdx in
[#14531](#14531)

### 🐛 Bug Fixes

- **(ci)** install zipsign with --locked by @fang2hou in
[#14551](#14551)
- **(github)** install each version with its own request options by
@JamBalaya56562 in [#14537](#14537)
- **(hooks)** run task hooks with mise instead of the initiating tool
shim by @jdx in [#14550](#14550)
- **(install)** keep lockfile resolution when a linked version doesn't
match the request by @jdx in
[#14539](#14539)
- **(java)** skip the catalog fetch when installing a locked build by
@jdx in [#14534](#14534)
- **(lock)** keep other platforms' option variants when mise link
rewrites mise.lock by @jdx in
[#14519](#14519)
- **(ruby)** lock windows platforms when running mise lock on Windows by
@jdx in [#14520](#14520)
- **(ruby)** lock linux and macos platforms when running mise lock on
Windows by @jdx in [#14529](#14529)
- **(rust)** restore the components a toolchain's profile requires by
@JamBalaya56562 in [#14525](#14525)
- **(shim)** keep task lazy tool shims when a task installs another tool
by @jdx in [#14533](#14533)
- **(task)** avoid deadlock when parallel tasks install the same tool by
@jdx in [#14536](#14536)
- **(watch)** exit quietly when watchexec is interrupted with Ctrl+C by
@jdx in [#14541](#14541)

### 📚 Documentation

- say OpenTelemetry export and spinel installs need experimental by
@ZainnQureshii in [#14552](#14552)

### ◀️ Revert

- Revert "chore(deps): pin zipsign-api to 0.2.1" by @jdx in
[baafe33](baafe33)

### 📦️ Dependency Updates

- pin zipsign-api to 0.2.1 by @jdx in
[6d1bd25](6d1bd25)
- rerun providers when mise recreates the venv by @halms in
[#14532](#14532)

### 📦 Registry

- prefer signed xcsift releases and enable Linux by @jdx in
[#14540](#14540)
- install protoc-gen-connect-go v2 from its /v2 module path by @jdx in
[#14545](#14545)

### Chore

- **(release)** pin zipsign install to 0.2.1 by @jdx in
[d5ef6f9](d5ef6f9)

### Security

- **(config)** ignore [settings] from untrusted project configs by @jdx
in [#14538](#14538)

### New Contributors

- @ZainnQureshii made their first contribution in
[#14552](#14552)
- @fang2hou made their first contribution in
[#14551](#14551)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant