Skip to content

Commit 7df573f

Browse files
committed
fix: use console.error before process.exit
1 parent ef98093 commit 7df573f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/blink/src/react/use-devhook.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,13 @@ export default function useDevhook(options: UseDevhookOptions) {
6666
// Ignore errors reading lock info
6767
}
6868

69-
options.logger.error(
70-
"system",
69+
// don't use logger since it's not guaranteed to print before exiting
70+
console.error(
7171
chalk.red(
7272
`\nError: Another ${chalk.bold("blink dev")} process is already running in this directory${pidMessage}.`
7373
)
7474
);
75-
options.logger.error(
76-
"system",
75+
console.error(
7776
chalk.red(`Please stop the other process and try again.\n`)
7877
);
7978
process.exit(1);

0 commit comments

Comments
 (0)