Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ require("./alias-resolver");

const fs = require("node:fs");
const path = require("node:path");
const Spawn = require("node:child_process").spawn;
const envsub = require("envsub");
const Log = require("logger");

Expand All @@ -25,7 +26,7 @@ global.mmTestMode = process.env.mmTestMode === "true";
Log.log(`Starting MagicMirror: v${global.version}`);

// Log system information.
Utils.logSystemInformation(global.version);
Spawn("node ./js/systeminformation.js", { cwd: this.root_path, shell: true, detached: true, stdio: "inherit" });

if (process.env.MM_CONFIG_FILE) {
global.configuration_file = process.env.MM_CONFIG_FILE.replace(`${global.root_path}/`, "");
Expand Down
4 changes: 4 additions & 0 deletions js/systeminformation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const mmVersion = require("../package").version;
const { logSystemInformation } = require("./utils");

logSystemInformation(`v${mmVersion}`);
2 changes: 1 addition & 1 deletion js/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const os = require("node:os");
const fs = require("node:fs");
const si = require("systeminformation");
const Log = require("logger");
const Log = require("./logger"); // needed with relative path because logSystemInformation is called in an own process in app.js

const modulePositions = []; // will get list from index.html
const regionRegEx = /"region ([^"]*)/i;
Expand Down