Skip to content

Commit

Permalink
wait for ready before doing anything
Browse files Browse the repository at this point in the history
  • Loading branch information
lerouxb committed Dec 27, 2024
1 parent ba4f8b3 commit 194fd6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/compass/src/main/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ class CompassApplication {
safeStorage.setUsePlainTextEncryption(true);
}

process.stdout.write('before first app.whenReady\n');
await app.whenReady();
process.stdout.write('after first app.whenReady\n');

process.stdout.write('before setupPreferencesAndUser\n');
const { preferences } = await setupPreferencesAndUser(
globalPreferences,
Expand Down
4 changes: 4 additions & 0 deletions packages/compass/src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ process.title = app.getName();
void main();

async function main(): Promise<void> {
process.stdout.write('before first app.whenReady\n');
await app.whenReady();
process.stdout.write('after first app.whenReady\n');

const globalPreferences = await parseAndValidateGlobalPreferences();

// These are expected to go away at some point.
Expand Down

0 comments on commit 194fd6a

Please sign in to comment.