refactor: use global.root_path instead relative paths (#3883)

This commit is contained in:
Karsten Hassel
2025-09-09 08:09:45 +02:00
committed by GitHub
parent 31bafc3297
commit b1865d8115
16 changed files with 34 additions and 35 deletions

View File

@@ -4,8 +4,6 @@ const fs = require("node:fs");
const path = require("node:path");
const Log = require("logger");
const BASE_DIR = path.normalize(`${__dirname}/../../../`);
class GitHelper {
constructor () {
this.gitRepos = [];
@@ -35,10 +33,10 @@ class GitHelper {
}
async add (moduleName) {
let moduleFolder = BASE_DIR;
let moduleFolder = `${global.root_path}`;
if (moduleName !== "MagicMirror") {
moduleFolder = `${moduleFolder}modules/${moduleName}`;
moduleFolder = `${moduleFolder}/modules/${moduleName}`;
}
try {