mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
Modified error messages
This commit is contained in:
parent
c482459e0e
commit
7e2dbd87fe
1 changed files with 3 additions and 3 deletions
|
@ -58,7 +58,7 @@ func Command() *cobra.Command {
|
|||
}()
|
||||
|
||||
if len(resourcePaths) == 0 && !cluster {
|
||||
return sanitizedError.NewWithError(fmt.Sprintf("Specify path to resource file or cluster name"), err)
|
||||
return sanitizedError.NewWithError(fmt.Sprintf("resource file or cluster required"), err)
|
||||
}
|
||||
|
||||
policies, openAPIController, err := common.GetPoliciesValidation(policyPaths)
|
||||
|
@ -73,7 +73,7 @@ func Command() *cobra.Command {
|
|||
os.Exit(3)
|
||||
}
|
||||
if policyHasVariables(*policy) {
|
||||
return sanitizedError.NewWithError(fmt.Sprintf("Policy %v is not valid - 'apply' does not support policies with variables", policy.Name), err)
|
||||
return sanitizedError.NewWithError(fmt.Sprintf("nvalid policy %s. 'apply' does not support policies with variables", policy.Name), err)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ func Command() *cobra.Command {
|
|||
|
||||
err = applyPolicyOnResource(policy, resource)
|
||||
if err != nil {
|
||||
return sanitizedError.NewWithError(fmt.Errorf("Issues applying policy %v on resource %v", policy.Name, resource.GetName()).Error(), err)
|
||||
return sanitizedError.NewWithError(fmt.Errorf("failed to apply policy %v on resource %v", policy.Name, resource.GetName()).Error(), err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue