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

backend/ipc.js

Lines changed: 5 additions & 0 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy