From 0bbc7d5161bb484c861bdc95ed32da8d59d8e927 Mon Sep 17 00:00:00 2001 From: Puskar Basu Date: Wed, 3 Jul 2024 15:46:02 +0530 Subject: [PATCH] Fix issue where the export CLI is not returning a 0 exit-code for failures. Closes #72 --- templates/main.go.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/main.go.tmpl b/templates/main.go.tmpl index 3a92de9..190b952 100644 --- a/templates/main.go.tmpl +++ b/templates/main.go.tmpl @@ -241,6 +241,8 @@ func executeQuery(tableName string, conectionName string, columns []string, qual response, err := stream.Recv() if err != nil { fmt.Printf("[ERROR] Error receiving data from the channel: %v", err) + // return a non-zero exit code + os.Exit(1) break } if response == nil {