Skip to content

Commit fc51ad0

Browse files
authored
fix(cli): do not capture stdin when in run mode (#4310)
1 parent 28109cc commit fc51ad0

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

packages/vitest/src/node/cli-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export async function startVitest(
8787
}
8888

8989
let stdinCleanup
90-
if (process.stdin.isTTY)
90+
if (process.stdin.isTTY && ctx.config.watch)
9191
stdinCleanup = registerConsoleShortcuts(ctx)
9292

9393
ctx.onServerRestart((reason) => {

packages/vitest/src/node/stdin.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ export function registerConsoleShortcuts(ctx: Vitest) {
4949
return
5050
}
5151

52-
// Other keys are for watch mode only
53-
if (!ctx.config.watch)
54-
return
55-
5652
const name = key?.name
5753

5854
if (ctx.runningPromise) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy