diff --git a/cmd/logs.go b/cmd/logs.go index d20c085..4284376 100644 --- a/cmd/logs.go +++ b/cmd/logs.go @@ -2,6 +2,7 @@ package cmd import ( "context" + "errors" "fmt" "runtime" @@ -24,6 +25,9 @@ var logsCmd = &cobra.Command{ Short: "Show logs of a project", RunE: func(cmd *cobra.Command, args []string) error { runtime.GOMAXPROCS(1) + if showLogID == -1 { + return errors.New("ID can not be empty") + } client, err := ent.Open("sqlite3", fmt.Sprintf("file:%s?mode=rwc&cache=private&_fk=1", sqliteFilename)) if err != nil { return fmt.Errorf("failed opening connection to sqlite: %v", err)