Файли
openidea/src/features/run/commandName.ts
T
l0ng-ai 181a2ea03e fix(run): recognise Windows launcher names in run configuration forms (#300)
Run configurations whose command is a Windows launcher (mvn.cmd, MVN.CMD, a full C:\\…\\mvn.cmd path, gradle.bat, pytest.exe, java.exe, godot.exe, npm.cmd) opened in the generic command fallback because the Maven/Gradle, npm, pytest, Godot and Application/Spring Boot forms compared executable names exactly. A shared commandName() (basename, either slash, .exe/.cmd/.bat/.com stripped case-insensitively) now matches them, and the original launcher text is kept so the command line round-trips unchanged.

Refs #244
2026-10-30 08:52:00 +08:00

6 рядки
326 B
TypeScript

/** Executable identity for form matching; keep the original command for launching. */
export function commandName(command: string): string {
const name = command.replace(/\\/g, "/").split("/").pop() ?? command;
return /\.(exe|cmd|bat|com)$/i.test(name) ? name.replace(/\.(exe|cmd|bat|com)$/i, "").toLowerCase() : name;
}