From 5700b7a795b5cf0df3ce63e817d81574ad5ed667 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 9 Jan 2024 13:02:55 -0500 Subject: [PATCH] Do not report to Rollbar permission errors when creating shell completions. Cobra is attempting to do it, and we have no control over how it does so. --- internal/runners/prepare/prepare.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/runners/prepare/prepare.go b/internal/runners/prepare/prepare.go index f4050c4f74..07945bbbfb 100644 --- a/internal/runners/prepare/prepare.go +++ b/internal/runners/prepare/prepare.go @@ -2,6 +2,7 @@ package prepare import ( "fmt" + "os" "runtime" svcApp "github.com/ActiveState/cli/cmd/state-svc/app" @@ -107,7 +108,7 @@ func (r *Prepare) Run(cmd *captain.Command) error { } if err := prepareCompletions(cmd, r.subshell); err != nil { - if !errs.Matches(err, &ErrorNotSupported{}) { + if !errs.Matches(err, &ErrorNotSupported{}) && !os.IsPermission(err) { r.reportError(locale.Tl("err_prepare_generate_completions", "Could not generate completions script, error received: {{.V0}}.", err.Error()), err) } }