From e3b4e9bf5639d9a6d3b4586a53449a1c9c530ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Tue, 4 Jun 2019 15:28:06 +0200 Subject: [PATCH] Cleaning the database checks for process.env --- backend/src/seed/reset-db.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/src/seed/reset-db.js b/backend/src/seed/reset-db.js index 5f4319f73..125d135d8 100644 --- a/backend/src/seed/reset-db.js +++ b/backend/src/seed/reset-db.js @@ -1,8 +1,7 @@ import { cleanDatabase } from './factories' -import CONFIG from './../config' -if (!CONFIG.DEBUG) { - throw new Error(`YOU CAN'T CLEAN THE DATABASE WITH DEBUG=${CONFIG.DEBUG}`) +if (process.env.NODE_ENV === 'production') { + throw new Error(`You cannot clean the database in production environment!`) } ;(async function() {