From df111b9eba08837b42dc16d410a31513104f03f3 Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Tue, 10 Jan 2017 12:04:58 +0100 Subject: [PATCH] Only allow process.exit in certain places --- lib/utils/check-path.js | 6 +----- package.json | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/utils/check-path.js b/lib/utils/check-path.js index ecb1d6e..8d71267 100644 --- a/lib/utils/check-path.js +++ b/lib/utils/check-path.js @@ -2,9 +2,6 @@ const os = require('os') const path = require('path') -// Ours -const {error} = require('../error') - const checkPath = async dir => { if (!dir) { return @@ -46,8 +43,7 @@ const checkPath = async dir => { locationName = location } - error(`You're trying to deploy your ${locationName}.`) - process.exit(1) + throw new Error(`You're trying to deploy your ${locationName}.`) } module.exports = checkPath diff --git a/package.json b/package.json index a021cee..b0b4999 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,6 @@ "max-depth": 0, "no-use-before-define": 0, "complexity": 0, - "unicorn/no-process-exit": 0, "no-control-regex": 0 } },