revert changes breaking node --run config:check (#3885)

This commit is contained in:
Karsten Hassel
2025-09-10 07:55:05 +02:00
committed by GitHub
parent b1865d8115
commit 2481bc621f
3 changed files with 9 additions and 5 deletions

View File

@@ -5,8 +5,9 @@ const Ajv = require("ajv");
const globals = require("globals");
const { Linter } = require("eslint");
const Log = require(`${global.root_path}/js/logger.js`);
const Utils = require(`${global.root_path}/js/utils.js`);
const rootPath = path.resolve(`${__dirname}/../`);
const Log = require(`${rootPath}/js/logger.js`);
const Utils = require(`${rootPath}/js/utils.js`);
const linter = new Linter({ configType: "flat" });
const ajv = new Ajv();
@@ -18,7 +19,7 @@ const ajv = new Ajv();
*/
function getConfigFile () {
// FIXME: This function should be in core. Do you want refactor me ;) ?, be good!
return path.resolve(process.env.MM_CONFIG_FILE || `${global.root_path}/config/config.js`);
return path.resolve(process.env.MM_CONFIG_FILE || `${rootPath}/config/config.js`);
}
/**

View File

@@ -1,4 +1,7 @@
const Log = require(`${global.root_path}/js/logger.js`);
const path = require("node:path");
const rootPath = path.resolve(`${__dirname}/../`);
const Log = require(`${rootPath}/js/logger.js`);
const os = require("node:os");
const fs = require("node:fs");
const si = require("systeminformation");