fix(launch): scope batch validation to PTYs

This commit is contained in:
can1357
2026-07-14 23:11:07 +02:00
parent 330744bfeb
commit b76f7aeecf
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -431,7 +431,7 @@ class DaemonBroker {
if (spec.detached && spec.pty) {
throw new Error("A detached daemon cannot allocate a PTY");
}
if (process.platform === "win32" && [".bat", ".cmd"].includes(path.extname(spec.application).toLowerCase())) {
if (spec.pty && process.platform === "win32" && [".bat", ".cmd"].includes(path.extname(spec.application).toLowerCase())) {
throw new Error('Windows batch files require application "cmd.exe" with the batch path after "/c"');
}
const existing = this.#records.get(spec.name);