Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Handle db open timeout err

Neeraj Gupta81daf19175cb
diff --git a/main.go b/main.go
index 624dd45c8c..c46572e371 100644
--- a/main.go
+++ b/main.go
@@ -9,6 +9,7 @@ import (
"cli-go/utils/constants"
"fmt"
"log"
+ "strings"
)
func main() {
@@ -22,7 +23,11 @@ func main() {
}
db, err := pkg.GetDB(fmt.Sprintf("%sente-cli.db", cliDBPath))
if err != nil {
- panic(err)
+ if strings.Contains(err.Error(), "timeout") {
+ log.Fatalf("Please close all other instances of the cli and try again\n%v\n", err)
+ } else {
+ panic(err)
+ }
}
ctrl := pkg.ClICtrl{
Client: api.NewClient(api.Params{