diff --git a/cmd/config/internal/commands/fmt_test.go b/cmd/config/internal/commands/fmt_test.go index bc7e5df56..c373a5ca7 100644 --- a/cmd/config/internal/commands/fmt_test.go +++ b/cmd/config/internal/commands/fmt_test.go @@ -143,6 +143,8 @@ func TestCmd_failFiles(t *testing.T) { // fmt the files r := commands.GetFmtRunner("") r.Command.SetArgs([]string{"notrealfile"}) + r.Command.SilenceUsage = true + r.Command.SilenceErrors = true err := r.Command.Execute() assert.EqualError(t, err, "lstat notrealfile: no such file or directory") }