π A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!
Vue awesomedashboarddockerhomelabhomepagemitnodejsorganizationproductivitypwaself-hostedstartpagevue
π Fixes using absolute path for opening conf.yml in the validator
Alicia Sykes783b70ded9c3
diff --git a/services/config-validator.js b/services/config-validator.jsindex 6dabe63b..0c19a40e 100644--- a/services/config-validator.js+++ b/services/config-validator.js@@ -4,6 +4,7 @@*/const fs = require('fs'); // For opening + reading files+const path = require('path'); // For resolving the config file pathconst yaml = require('js-yaml'); // For parsing YAMLconst Ajv = require('ajv'); // For validating with schema@@ -101,7 +102,8 @@ const printFileReadError = (e) => {let config = {};try { // Try to open and parse the YAML file- config = yaml.load(fs.readFileSync(`./${process.env.USER_DATA_DIR || 'user-data'}/conf.yml`, 'utf8'));+ const confPath = path.resolve(__dirname, '..', process.env.USER_DATA_DIR || 'user-data', 'conf.yml');+ config = yaml.load(fs.readFileSync(confPath, 'utf8'));validate(config);} catch (e) { // Something went very wrong...setIsValidVariable(false);