This commit is contained in:
dwertent
2021-10-13 11:58:22 +03:00
parent 81a4c168ed
commit 7f9c5c25ae
+4
View File
@@ -2,6 +2,7 @@ package policyhandler
import (
"fmt"
"strings"
"github.com/armosec/kubescape/cautils"
"github.com/armosec/kubescape/cautils/armotypes"
@@ -24,6 +25,9 @@ func (policyHandler *PolicyHandler) GetPoliciesFromBackend(notification *opapoli
exceptionPolicies = append(exceptionPolicies, recExceptionPolicies...)
}
} else if err != nil {
if strings.Contains(err.Error(), "unsupported protocol scheme") {
err = fmt.Errorf("failed to download from GitHub release, try running with `--use-default` flag")
}
return nil, nil, fmt.Errorf("kind: %v, name: %s, error: %s", rule.Kind, rule.Name, err.Error())
}