dotnet / dotnet/sdk

Global tool .cmd shims will show "Terminate Batch Job" prompt on CTRL+C

Open
#49,662 6 comments 0 reactions 0 assignees View on GitHub
Area-Tools good first issue untriaged
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

On Windows, for tools where the runner type is executable, we create a .cmd script shim that invokes the tool. The shim goes in the dotnet tools folder which is on the path.

Unfortunately, batch files like this will generate an extra `Terminate batch job (Y/N)` prompt when CTRL+C is pressed. We ran into this for `dnx` in #49623.

We should probably generate both a PowerShell and a .cmd shell shim script, so that for users of PowerShell, that script will be preferred and they won't get the extra termination prompt when CTRL+C is pressed.

The logic to create the script is in the `ShellShimRepository` class.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.