Skip to content

Commit ec6453d

Browse files
authored
fix: installer compilation (#5908)
For some reason typescript can't find electron types when using nested tsconfig - workaround the bug. Drive-by: surface installer compilation problems.
1 parent 172de40 commit ec6453d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

install-from-github.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ const {execSync} = require('child_process');
2121

2222
console.log(`Rebuilding installer...`);
2323
try {
24-
execSync('npm run tsc-installer');
24+
execSync('npm run tsc-installer', {
25+
stdio: ['inherit', 'inherit', 'inherit'],
26+
});
2527
} catch (e) {
28+
process.exit(1);
2629
}
2730

2831
console.log(`Downloading browsers...`);

src/utils/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function makeWaitForNextTask() {
2727
// As of Mar 2021, Electorn v12 doesn't create new task with `setImmediate` despite
2828
// using Node 14 internally, so we fallback to `setTimeout(0)` instead.
2929
// @see https://github.com/electron/electron/issues/28261
30-
if (process.versions.electron)
30+
if ((process.versions as any).electron)
3131
return (callback: () => void) => setTimeout(callback, 0);
3232
if (parseInt(process.versions.node, 10) >= 11)
3333
return setImmediate;

0 commit comments

Comments
 (0)