From 9f370fbb567d5a8ce8bdc7face096cfe673be1d9 Mon Sep 17 00:00:00 2001 From: Kurt Hutten Date: Fri, 23 Aug 2024 06:02:23 +1000 Subject: [PATCH] default to production when no NODE_ENV (#3614) * default to production when no NODE_ENV * tweak message --------- Co-authored-by: 49fl --- src/main.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.ts b/src/main.ts index 69a7d4ec9..beb329b2a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -10,11 +10,11 @@ import { Bonjour, Service } from 'bonjour-service' import * as kittycad from '@kittycad/lib/import' // If it's not set, scream. -const NODE_ENV = process.env.NODE_ENV -if (!NODE_ENV) { - console.error('*FOX SCREAM* process.env.NODE_ENV is not explicitly set!') - process.exit(1) -} +const NODE_ENV = process.env.NODE_ENV || 'production' +if (!process.env.NODE_ENV) + console.warn( + '*FOX SCREAM* process.env.NODE_ENV is not explicitly set!, defaulting to production' + ) dotenv.config({ path: [`.env.${NODE_ENV}.local`, `.env.${NODE_ENV}`] }) // Handle creating/removing shortcuts on Windows when installing/uninstalling.