From e79ca20d4db82dd79282cae48fef1bf7061f0115 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Wed, 11 Sep 2024 14:29:32 +0800 Subject: [PATCH] ci: fix --- packages/tasks/src/localnet.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/tasks/src/localnet.ts b/packages/tasks/src/localnet.ts index 366c6fc..7059d04 100644 --- a/packages/tasks/src/localnet.ts +++ b/packages/tasks/src/localnet.ts @@ -111,14 +111,6 @@ const localnet = async (args: any) => { console.table(zetaAddresses); fs.writeFileSync(LOCALNET_PID_FILE, process.pid.toString(), "utf-8"); - - if (args.stopAfterInit) { - console.log( - ansis.green("Localnet successfully initialized. Stopping...") - ); - cleanup(); - process.exit(0); - } } catch (error: any) { console.error(ansis.red`Error initializing localnet: ${error}`); cleanup(); @@ -138,6 +130,12 @@ const localnet = async (args: any) => { console.log("Process exiting..."); }); + if (args.stopAfterInit) { + console.log(ansis.green("Localnet successfully initialized. Stopping...")); + cleanup(); + process.exit(0); + } + await new Promise(() => {}); };