Commit 2657ed0
committed
fix: handle Electron spawn in benchmark auto-run guard
The require.main === module check fails when Electron spawns the
script via spawn(electronBinary, [scriptPath]) because Electron's
module loader sets require.main differently. Added fallback check
on process.argv[1] to handle both plain Node and Electron spawn.1 parent 46fac0e commit 2657ed0
File tree
1 file changed
+7
-2
lines changed- skills/analysis/home-security-benchmark/scripts
1 file changed
+7
-2
lines changedLines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1806 | 1806 | | |
1807 | 1807 | | |
1808 | 1808 | | |
1809 | | - | |
1810 | | - | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
1811 | 1816 | | |
1812 | 1817 | | |
1813 | 1818 | | |
| |||
0 commit comments