Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Commit

Permalink
Fixes #183 wrap API call in try-catch in get-about event handler
Browse files Browse the repository at this point in the history
  • Loading branch information
anjannath authored and gbraad committed Mar 4, 2022
1 parent 37edd1b commit 809bd3d
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1043,14 +1043,18 @@ ipcMain.on('track-success', async (event, arg) => {
// ------------------------------------------------------------------------- */

ipcMain.handle('get-about', async () => {
const version = await commander.version();
return {
appVersion: app.getVersion(),
crcVersion: version.CrcVersion,
crcCommit: version.CommitSha,
ocpBundleVersion: version.OpenshiftVersion,
podmanVersion: version.PodmanVersion
};
try {
const version = await commander.version();
return {
appVersion: app.getVersion(),
crcVersion: version.CrcVersion,
crcCommit: version.CommitSha,
ocpBundleVersion: version.OpenshiftVersion,
podmanVersion: version.PodmanVersion
};
} catch (e) {
console.log(e)
}
});

/* ----------------------------------------------------------------------------
Expand Down

0 comments on commit 809bd3d

Please sign in to comment.