Fix deep links on Linux .desktop files (#5337)
* Fix deep links on Linux .desktop files Fixes #5325 * Fix lint
This commit is contained in:
11
src/main.ts
11
src/main.ts
@ -94,12 +94,11 @@ const createWindow = (pathToOpen?: string, reuse?: boolean): BrowserWindow => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Deep Link: Case of a cold start from Windows or Linux
|
// Deep Link: Case of a cold start from Windows or Linux
|
||||||
if (
|
const zooProtocolArg = process.argv.find((a) =>
|
||||||
!pathToOpen &&
|
a.startsWith(ZOO_STUDIO_PROTOCOL + '://')
|
||||||
process.argv.length > 1 &&
|
)
|
||||||
process.argv[1].indexOf(ZOO_STUDIO_PROTOCOL + '://') > -1
|
if (!pathToOpen && zooProtocolArg) {
|
||||||
) {
|
pathToOpen = zooProtocolArg
|
||||||
pathToOpen = process.argv[1]
|
|
||||||
console.log('Retrieved deep link from argv', pathToOpen)
|
console.log('Retrieved deep link from argv', pathToOpen)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user