fix(launch): scope batch validation to PTYs
This commit is contained in:
@@ -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);
|
||||
|
||||
Vendored
+4
-1
@@ -86,7 +86,10 @@ export declare class PtySession {
|
||||
constructor()
|
||||
/** Start a shell command and stream output chunks via callback. */
|
||||
start(options: PtyStartOptions, onChunk?: ((error: Error | null, chunk: string) => void) | undefined | null): Promise<PtyRunResult>
|
||||
/** Start an executable with separate arguments and stream output chunks via callback. */
|
||||
/**
|
||||
* Start an executable with separate arguments and stream output chunks via
|
||||
* callback.
|
||||
*/
|
||||
startArgv(options: PtyArgvStartOptions, onChunk?: ((error: Error | null, chunk: string) => void) | undefined | null): Promise<PtyRunResult>
|
||||
/** Write raw input bytes to PTY stdin. */
|
||||
write(data: string): void
|
||||
|
||||
Reference in New Issue
Block a user