From 4438d13ab41e95cd8dd6572b8f9779d2a42480e7 Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Mon, 31 May 2021 09:58:58 +0200 Subject: [PATCH] env variables are strings, fix conditions --- packages/health-check/src/checks/critical.js | 2 +- packages/health-check/src/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/health-check/src/checks/critical.js b/packages/health-check/src/checks/critical.js index 9b71ab03..69cfa1f9 100644 --- a/packages/health-check/src/checks/critical.js +++ b/packages/health-check/src/checks/critical.js @@ -108,7 +108,7 @@ async function genericAccessCheck(name, url, done) { const checks = [uploadCheck, websiteCheck, downloadCheck, skylinkSubdomainCheck, handshakeSubdomainCheck]; -if (process.env.ACCOUNTS_ENABLED) { +if (process.env.ACCOUNTS_ENABLED === "1") { checks.push(accountHealthCheck, accountWebsiteCheck); } diff --git a/packages/health-check/src/index.js b/packages/health-check/src/index.js index a49ee81c..22277e9f 100644 --- a/packages/health-check/src/index.js +++ b/packages/health-check/src/index.js @@ -4,7 +4,7 @@ if (!process.env.SKYNET_PORTAL_API) { throw new Error("You need to provide SKYNET_PORTAL_API environment variable"); } -if (process.env.ACCOUNTS_ENABLED && !process.env.SKYNET_DASHBOARD_URL) { +if (process.env.ACCOUNTS_ENABLED === "1" && !process.env.SKYNET_DASHBOARD_URL) { throw new Error("You need to provide SKYNET_DASHBOARD_URL environment variable when accounts are enabled"); }