Skip to content

Commit

Permalink
Request only required information instead of all
Browse files Browse the repository at this point in the history
Hopefully this solves the problem with arm64 (reported in PR MagicMirrorOrg#3337).
  • Loading branch information
KristjanESPERANTO committed Jan 7, 2024
1 parent 407072d commit 3b110ce
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ module.exports = {
async logSystemInformation () {
try {
let installedNodeVersion = execSync("node -v", { encoding: "utf-8" }).replace("v", "").replace(/(?:\r\n|\r|\n)/g, "");
const staticData = await si.getStaticData();

const staticData = await si.get({
system: "manufacturer, model, raspberry, virtual",
osInfo: "platform, distro, release, arch",
versions: "kernel, node, npm, pm2"
});
let systemDataString = "System information:";
systemDataString += `\n### SYSTEM: manufacturer: ${staticData["system"]["manufacturer"]}; model: ${staticData["system"]["model"]}; raspberry: ${staticData["system"]["raspberry"]}; virtual: ${staticData["system"]["virtual"]}`;
systemDataString += `\n### OS: platform: ${staticData["os"]["platform"]}; distro: ${staticData["os"]["distro"]}; release: ${staticData["os"]["release"]}; arch: ${staticData["os"]["arch"]}; kernel: ${staticData["versions"]["kernel"]}`;
systemDataString += `\n### OS: platform: ${staticData["osInfo"]["platform"]}; distro: ${staticData["osInfo"]["distro"]}; release: ${staticData["osInfo"]["release"]}; arch: ${staticData["osInfo"]["arch"]}; kernel: ${staticData["versions"]["kernel"]}`;
systemDataString += `\n### VERSIONS: electron: ${process.versions.electron}; used node: ${staticData["versions"]["node"]}; installed node: ${installedNodeVersion}; npm: ${staticData["versions"]["npm"]}; pm2: ${staticData["versions"]["pm2"]}`;
systemDataString += `\n### OTHER: timeZone: ${Intl.DateTimeFormat().resolvedOptions().timeZone}; ELECTRON_ENABLE_GPU: ${process.env.ELECTRON_ENABLE_GPU}`;
Log.info(systemDataString);
Expand Down

0 comments on commit 3b110ce

Please sign in to comment.