From e83dce3304f7cef242fb87d47fb6394c4b6f60db Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Fri, 23 Jul 2021 23:04:44 -0600 Subject: [PATCH] fix(livereload): process env vars as strings not boolean --- build/livereload.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build/livereload.js b/build/livereload.js index 5489be9..57a155a 100644 --- a/build/livereload.js +++ b/build/livereload.js @@ -11,14 +11,18 @@ const options = { exclusions: process.env.LR_EXCLUDE, usePolling: true, delay: process.env.LR_DELAY, - debug: process.env.LR_DEBUG }; -if (process.env.LR_HTTPS) { +// set debugging output as per LR_DEBUG +if (process.env.LR_DEBUG === "true") { + options.debug = true +} + +// set HTTPS as per LR_HTTPS +if (process.env.LR_HTTPS === "true") { options.https = { cert: fs.readFileSync('/certs/fullchain.pem'), key: fs.readFileSync('/certs/privkey.pem') - }; }