From 781b4705f2b1c705cefb7d724f602aa94d0e5056 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Wed, 2 Sep 2020 04:44:50 -0700 Subject: [PATCH] fix(command-env): handle non existing import file on node 8 (#1195) --- src/commands/env/import.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/env/import.js b/src/commands/env/import.js index b4c5ff9e6ee..50f55c284db 100644 --- a/src/commands/env/import.js +++ b/src/commands/env/import.js @@ -37,7 +37,8 @@ class EnvImportCommand extends Command { const envFileContents = fs.readFileSync(fileName) importedEnv = dotenv.parse(envFileContents) } catch (e) { - this.error(e) + this.log(e.message) + this.exit(1) } if (isEmpty(importedEnv)) {