Skip to content

Commit

Permalink
fix: installer compilation
Browse files Browse the repository at this point in the history
For some reason typescript can't find electron types when using
nested tsconfig - workaround the bug.

Drive-by: surface installer compilation problems.
  • Loading branch information
aslushnikov committed Mar 22, 2021
1 parent 2064d27 commit 95ffa08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion install-from-github.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ const {execSync} = require('child_process');

console.log(`Rebuilding installer...`);
try {
execSync('npm run tsc-installer');
const {stdout, stderr} = execSync('npm run tsc-installer', {
stdio: ['inherit', 'inherit', 'inherit'],
});
} catch (e) {
process.exit(1);
}

console.log(`Downloading browsers...`);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function makeWaitForNextTask() {
// As of Mar 2021, Electorn v12 doesn't create new task with `setImmediate` despite
// using Node 14 internally, so we fallback to `setTimeout(0)` instead.
// @see https://github.com/electron/electron/issues/28261
if (process.versions.electron)
if ('electron' in process.versions)
return (callback: () => void) => setTimeout(callback, 0);
if (parseInt(process.versions.node, 10) >= 11)
return setImmediate;
Expand Down

0 comments on commit 95ffa08

Please sign in to comment.