fix error check in scripts for .env
Browse files- scripts/updateLocalEnv.ts +1 -1
- scripts/updateProdEnv.ts +1 -1
scripts/updateLocalEnv.ts
CHANGED
@@ -4,7 +4,7 @@ const SECRET_CONFIG = fs.existsSync(".env.SECRET_CONFIG")
|
|
4 |
? fs.readFileSync(".env.SECRET_CONFIG", "utf8")
|
5 |
: process.env.SECRET_CONFIG;
|
6 |
|
7 |
-
if (SECRET_CONFIG
|
8 |
throw new Error(
|
9 |
"SECRET_CONFIG is not defined. Please provide it either in a file or as an environment variable."
|
10 |
);
|
|
|
4 |
? fs.readFileSync(".env.SECRET_CONFIG", "utf8")
|
5 |
: process.env.SECRET_CONFIG;
|
6 |
|
7 |
+
if (!SECRET_CONFIG) {
|
8 |
throw new Error(
|
9 |
"SECRET_CONFIG is not defined. Please provide it either in a file or as an environment variable."
|
10 |
);
|
scripts/updateProdEnv.ts
CHANGED
@@ -5,7 +5,7 @@ const SECRET_CONFIG = fs.existsSync(".env.SECRET_CONFIG")
|
|
5 |
? fs.readFileSync(".env.SECRET_CONFIG", "utf8")
|
6 |
: process.env.SECRET_CONFIG;
|
7 |
|
8 |
-
if (SECRET_CONFIG
|
9 |
throw new Error(
|
10 |
"SECRET_CONFIG is not defined. Please provide it either in a file or as an environment variable."
|
11 |
);
|
|
|
5 |
? fs.readFileSync(".env.SECRET_CONFIG", "utf8")
|
6 |
: process.env.SECRET_CONFIG;
|
7 |
|
8 |
+
if (!SECRET_CONFIG) {
|
9 |
throw new Error(
|
10 |
"SECRET_CONFIG is not defined. Please provide it either in a file or as an environment variable."
|
11 |
);
|