Skip to content

Commit 8fe7584

Browse files
committed
Increase the time before clearing a user interruption message
1 parent b0266e5 commit 8fe7584

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

v-next/hardhat-ignition/src/internal/hook-handlers/user-interruptions.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,14 @@ export function getUserInterruptionsHandlers(): UserInterruptionHooks {
2424

2525
const returnValue = next(context, interruptor, message);
2626

27-
// Wait a few seconds so the user can read the message
28-
const WAIT_MESSAGE_TIME_MS = 6_000;
29-
await new Promise((resolve) => setTimeout(resolve, WAIT_MESSAGE_TIME_MS));
27+
// If we are going to clear the message out, we wait some time before
28+
// doing it, so that the user can read it.
29+
if (process.stdout.isTTY) {
30+
const WAIT_MESSAGE_TIME_MS = 10_000;
31+
await new Promise((resolve) =>
32+
setTimeout(resolve, WAIT_MESSAGE_TIME_MS),
33+
);
34+
}
3035

3136
restoreAndClearBelow();
3237

0 commit comments

Comments
 (0)