summaryrefslogtreecommitdiff
path: root/cmd/dgrep/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/dgrep/main.go')
-rw-r--r--cmd/dgrep/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/dgrep/main.go b/cmd/dgrep/main.go
index 0e4eb29..121b576 100644
--- a/cmd/dgrep/main.go
+++ b/cmd/dgrep/main.go
@@ -2,6 +2,7 @@ package main
import (
"flag"
+ "fmt"
"os"
"github.com/mimecast/dtail/internal/cli"
@@ -73,7 +74,8 @@ func main() {
client, err := clients.NewGrepClient(args)
if err != nil {
runtime.Stop()
- panic(err)
+ fmt.Fprintf(os.Stderr, "unable to create dgrep client: %v\n", err)
+ os.Exit(1)
}
status := client.Start(runtime.Context(), signal.InterruptCh(runtime.Context()))