Skip to content

Commit

Permalink
fix: stuck update (#50)
Browse files Browse the repository at this point in the history
* fix: update regex to wait for no updates

* fix: use the app version instead of the one in package.json
  • Loading branch information
cazala authored Jul 29, 2024
1 parent 8523fb8 commit 498d16b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/main/src/modules/bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ export async function install() {
cwd: APP_UNPACKED_PATH,
workspace,
});
await npmInstall.waitFor(/added \d+ packages/); // wait for successs message, because when the user quits the app while installing, npm exits gracefully with an exit code=0;
await npmInstall.waitFor(/added \d+ packages|up to date/); // wait for successs message, because when the user quits the app while installing, npm exits gracefully with an exit code=0;

// save the current version to the registry
log.info('[Install] Writing current version to the registry');
await fs.writeFile(
path.join(APP_UNPACKED_PATH, 'version.json'),
JSON.stringify({ version: import.meta.env.VITE_APP_VERSION }),
JSON.stringify({ version: app.getVersion() }),
);
} else {
log.info('[Install] Skipping installation of node_modules because it is up to date');
Expand Down

0 comments on commit 498d16b

Please sign in to comment.