Skip to content

Consider using a Windows trampoline .exe instead of a .cmd wrapper to avoid Terminate batch job (Y/N)? #835

@sunfkny

Description

@sunfkny

Description

On Windows, the CLI currently appears to be exposed through a .cmd wrapper. This can lead to inconvenient behavior when users press Ctrl+C.

When Ctrl+C is pressed while running a batch script, cmd.exe may display the prompt:

Terminate batch job (Y/N)?

This can interrupt normal CLI workflows, especially for tools that users expect to stop immediately when interrupted. It also differs from the typical behavior on Unix-like systems where Ctrl+C directly stops the running command.

Suggested solution

One possible alternative is to generate a small Windows trampoline .exe that forwards execution to the real CLI entrypoint instead of invoking it through a .cmd script.

A reference implementation of this pattern can be found in the trampoline used by astral-sh/uv:

https://github.com/astral-sh/uv/tree/main/crates/uv-trampoline

That approach generates lightweight .exe launchers and avoids relying on batch scripts.

This might be a useful approach if improving Ctrl+C behavior on Windows is something the project is interested in addressing.

Alternative

No response

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
  • Check that there isn't already an issue requesting the same feature.

Metadata

Metadata

Assignees

Labels

Priority

None yet

Start date

None yet

Target date

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions