Skip to content

Commit

Permalink
fix: prevent set protocol crash whole process
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Apr 17, 2022
1 parent 027e46d commit 0342c97
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion xmcl-electron-app/main/ElectronLauncherApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,12 @@ export default class ElectronLauncherApp extends LauncherApp {
await super.setup()

if (this.platform.name === 'linux') {
await setLinuxProtocol(app.getPath('home'), app.getPath('exe'))
try {
await setLinuxProtocol(app.getPath('home'), app.getPath('exe'))
} catch (e) {
this.error('Fail to set linux protocol! This might cause you cannot automatically login microsoft!')
this.error(e)
}
}

setup(this.serviceStateManager)
Expand Down

0 comments on commit 0342c97

Please sign in to comment.