We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 045fe42 commit 0538cc1Copy full SHA for 0538cc1
1 file changed
src/lib/winsw.ts
@@ -172,6 +172,12 @@ function runWinsw(args: string[]): string {
172
173
/** `install /p` prompts for the service-account password on the console — stdin must be inherited. */
174
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
+ }
181
execFileSync(winswExePath(), args, { stdio: "inherit" });
182
}
183
0 commit comments