Respect --no-open option during server startup

Summary:
This was previously ignored and can get a little annoying while testing.

Changelog: Respect --no-open during server startup

Reviewed By: timur-valiev

Differential Revision: D34932895

fbshipit-source-id: d2bf9d6fb57a76834b86ab013baf01628d2550fc
This commit is contained in:
Pascal Hartig
2022-03-16 16:39:23 -07:00
committed by Facebook GitHub Bot
parent d40ff61870
commit 314855f5e1

View File

@@ -130,7 +130,7 @@ let startCount = 0;
async function restartServer() { async function restartServer() {
try { try {
await compileServerMain(true); await compileServerMain(true);
await launchServer(true, ++startCount === 1); // only openon the first time await launchServer(true, argv.open && ++startCount === 1); // only open on the first time
} catch (e) { } catch (e) {
console.error( console.error(
chalk.red( chalk.red(