Skip to content

Commit

Permalink
resolving exiftool cleanup issues
Browse files Browse the repository at this point in the history
  • Loading branch information
catdad committed Apr 4, 2024
1 parent 52a61d0 commit bb3d8fd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"archiver": "^3.0.0",
"chai": "^4.2.0",
"del": "^5.1.0",
"electron": "^14.2.9",
"electron": "^16.2.8",
"electron-background": "^1.0.0",
"electron-builder": "^22.14.5",
"electron-packager": "^14.1.0",
Expand Down
13 changes: 9 additions & 4 deletions test/lib/app-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,17 @@ module.exports = {
console.log(logs);
}

// this is needed in order to perform the exiftoon cleanup logic
for (const page of (await _browser.pages())) {
await page.evaluate(() => window.close()).catch(() => {});
// this is needed in order to perform the exiftool cleanup logic
const pages = await _browser.pages();

if (pages.length) {
for (const page of pages) {
await page.evaluate(() => window.close()).catch(() => {});
}
} else {
await _browser.close();
}

await _browser.close();
_browser = null;
}
};

0 comments on commit bb3d8fd

Please sign in to comment.