Skip to content

Commit 1173bd2

Browse files
committed
Disable compilation outputs from printing to stdout
1 parent fc0312d commit 1173bd2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/lekko/feature.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"context"
1919
"encoding/json"
2020
"fmt"
21+
"io"
2122
"os"
2223
"os/exec"
2324
"path"
@@ -324,6 +325,11 @@ func configGroup() *cobra.Command {
324325
if err != nil {
325326
return err
326327
}
328+
// Don't output for compilations
329+
// Downside: for unhappy path, compile errors will be less obvious
330+
r.ConfigureLogger(&repo.LoggingConfiguration{
331+
Writer: io.Discard,
332+
})
327333
ctx := cmd.Context()
328334
// Take namespace input if necessary
329335
if ns == "" {

0 commit comments

Comments
 (0)