Files
MagicMirror/defaultmodules
Kristjan ESPERANTO 1b540aeba1 fix(updatenotification): use process.argv[0] as restart binary (#4163)
The restart approach I introduced in #4156 still crashes under Electron:

```
TypeError: Cannot read properties of undefined (reading 'disableHardwareAcceleration')
    at electron.js:18
```

`nodeRestart()` hardcodes `node` as the interpreter, but under Electron
`process.argv[0]` is the Electron binary. Spawning `node js/electron.js`
causes `require("electron")` to return a string instead of the API, so
`electron.app` is `undefined`.

This uses `process.argv[0]` as the binary directly, which works for both
Electron and plain Node.

I introduced more variables for more clarity.

Fixes #4154.
2026-05-20 19:30:51 +02:00
..