Don't show dialog box when run from terminal (#2560)

This commit is contained in:
WithoutPants 2022-05-05 11:30:10 +10:00 committed by GitHub
parent 727644fab3
commit d77f47824c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 4 deletions

View file

@ -46,9 +46,8 @@ func recoverPanic() {
}
func handleError(err error) {
desktop.FatalError(err)
if desktop.IsDesktop() {
desktop.FatalError(err)
manager.GetInstance().Shutdown(0)
} else {
panic(err)

View file

@ -1,7 +1,6 @@
package desktop
import (
"fmt"
"io/ioutil"
"os"
"path"
@ -64,7 +63,6 @@ func SendNotification(title string, text string) {
func IsDesktop() bool {
if isDoubleClickLaunched() {
fmt.Println("double click launched")
return true
}