From b87a85b4f4b833395429bf79dd1f739b63d1deb5 Mon Sep 17 00:00:00 2001 From: Mitch Pierias Date: Fri, 26 Apr 2019 13:33:20 +1000 Subject: [PATCH] Stop container if running while error throw --- src/cli/lamington-test.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/cli/lamington-test.ts b/src/cli/lamington-test.ts index 621b594..c5efb52 100644 --- a/src/cli/lamington-test.ts +++ b/src/cli/lamington-test.ts @@ -31,6 +31,13 @@ const run = async () => { } }; -run().catch(error => { - throw error; +run().catch(async (error) => { + if (await eosIsReady()) { + stopContainer().then(() => { + //console.log(error) + process.exit(1); + }); + } else { + console.log(error) + } });