Skip to content

Commit 0538cc1

Browse files
committed
fix(winsw): restore interactive install TTY guard after rebase
The ACL pivot cleanup commit dropped tip's stdin.isTTY check; keep it.
1 parent 045fe42 commit 0538cc1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/lib/winsw.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,12 @@ function runWinsw(args: string[]): string {
172172

173173
/** `install /p` prompts for the service-account password on the console — stdin must be inherited. */
174174
function runWinswInteractive(args: string[]): void {
175+
if (!process.stdin.isTTY) {
176+
throw new Error(
177+
"WinSW install requires an interactive console to prompt for the service account password. "
178+
+ "Run `ocx service install --native` from an elevated Command Prompt or PowerShell window, not a hidden or piped session.",
179+
);
180+
}
175181
execFileSync(winswExePath(), args, { stdio: "inherit" });
176182
}
177183

0 commit comments

Comments
 (0)