Skip to content

Commit 82e39a2

Browse files
authored
fix systeminformation not displaying electron version (#4012)
Bug was introduced with #4002 Because the sysinfo process runs as own subprocess the `${process.versions.electron}` variable is always `undefined`.
1 parent 3b793bf commit 82e39a2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ global.mmTestMode = process.env.mmTestMode === "true";
2626
Log.log(`Starting MagicMirror: v${global.version}`);
2727

2828
// Log system information.
29-
Spawn("node ./js/systeminformation.js", { cwd: this.root_path, shell: true, detached: true, stdio: "inherit" });
29+
Spawn("node ./js/systeminformation.js", { env: { ...process.env, ELECTRON_VERSION: `${process.versions.electron}` }, cwd: this.root_path, shell: true, detached: true, stdio: "inherit" });
3030

3131
if (process.env.MM_CONFIG_FILE) {
3232
global.configuration_file = process.env.MM_CONFIG_FILE.replace(`${global.root_path}/`, "");

js/systeminformation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const logSystemInformation = async () => {
2020
"\n#### System Information ####",
2121
`- SYSTEM: manufacturer: ${system.manufacturer}; model: ${system.model}; virtual: ${system.virtual}; MM: v${mmVersion}`,
2222
`- OS: platform: ${osInfo.platform}; distro: ${osInfo.distro}; release: ${osInfo.release}; arch: ${osInfo.arch}; kernel: ${versions.kernel}`,
23-
`- VERSIONS: electron: ${process.versions.electron}; used node: ${usedNodeVersion}; installed node: ${installedNodeVersion}; npm: ${versions.npm}; pm2: ${versions.pm2}`,
23+
`- VERSIONS: electron: ${process.env.ELECTRON_VERSION}; used node: ${usedNodeVersion}; installed node: ${installedNodeVersion}; npm: ${versions.npm}; pm2: ${versions.pm2}`,
2424
`- ENV: XDG_SESSION_TYPE: ${process.env.XDG_SESSION_TYPE}; MM_CONFIG_FILE: ${process.env.MM_CONFIG_FILE}`,
2525
` WAYLAND_DISPLAY: ${process.env.WAYLAND_DISPLAY}; DISPLAY: ${process.env.DISPLAY}; ELECTRON_ENABLE_GPU: ${process.env.ELECTRON_ENABLE_GPU}`,
2626
`- RAM: total: ${totalRam} MB; free: ${freeRam} MB; used: ${usedRam} MB`,

0 commit comments

Comments
 (0)