Fix linux deeplinks not working (#5041)
This commit is contained in:
@@ -174,9 +174,10 @@ if (MAIN_WINDOW_VITE_DEV_SERVER_URL) {
|
|||||||
app.setAsDefaultProtocolClient('goose');
|
app.setAsDefaultProtocolClient('goose');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only apply single instance lock on Windows where it's needed for deep links
|
// Apply single instance lock on Windows and Linux where it's needed for deep links
|
||||||
|
// macOS uses the 'open-url' event instead
|
||||||
let gotTheLock = true;
|
let gotTheLock = true;
|
||||||
if (process.platform === 'win32') {
|
if (process.platform !== 'darwin') {
|
||||||
gotTheLock = app.requestSingleInstanceLock();
|
gotTheLock = app.requestSingleInstanceLock();
|
||||||
|
|
||||||
if (!gotTheLock) {
|
if (!gotTheLock) {
|
||||||
@@ -226,7 +227,7 @@ if (process.platform === 'win32') {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle protocol URLs on Windows startup
|
// Handle protocol URLs on Windows and Linux startup
|
||||||
const protocolUrl = process.argv.find((arg) => arg.startsWith('goose://'));
|
const protocolUrl = process.argv.find((arg) => arg.startsWith('goose://'));
|
||||||
if (protocolUrl) {
|
if (protocolUrl) {
|
||||||
app.whenReady().then(() => {
|
app.whenReady().then(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user