Skip to content

Commit 8615b76

Browse files
authored
Merge pull request #180 from arduino/feature/pkg-launcher-fallback
Add fallback for Package Installer launch button
2 parents a4ffba4 + 5e8abf8 commit 8615b76

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: backend/ipc.js

+5
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ module.exports = function registerIPCHandlers(win, ipcMain, app, dialog) {
142142
ipcMain.handle('launch-app', async (event, urlScheme) => {
143143
// Launch an external app with a custom protocol
144144
return new Promise((resolve, reject) => {
145+
if(app.getApplicationNameForProtocol(urlScheme) === '') {
146+
resolve(false); // App not installed
147+
return;
148+
}
149+
145150
try {
146151
shell.openExternal(urlScheme).then(() => {
147152
resolve(true); // App opened successfully

0 commit comments

Comments
 (0)