Show the not present configmap/secret name while fn create in err message [CLI-UX] (#1462)
This commit is contained in:
committed by
Ta-Ching Chen
parent
2b4e53e926
commit
711d7c2c41
@@ -235,7 +235,7 @@ func (opts *CreateSubCommand) complete(input cli.Input) error {
|
|||||||
if k8serrors.IsNotFound(err) {
|
if k8serrors.IsNotFound(err) {
|
||||||
console.Warn(fmt.Sprintf("Secret %s not found in Namespace: %s. Secret needs to be present in the same namespace as function", secretName, fnNamespace))
|
console.Warn(fmt.Sprintf("Secret %s not found in Namespace: %s. Secret needs to be present in the same namespace as function", secretName, fnNamespace))
|
||||||
} else {
|
} else {
|
||||||
return errors.Wrap(err, "error checking secret")
|
return errors.Wrapf(err, "error checking secret %s", secretName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -261,7 +261,7 @@ func (opts *CreateSubCommand) complete(input cli.Input) error {
|
|||||||
if k8serrors.IsNotFound(err) {
|
if k8serrors.IsNotFound(err) {
|
||||||
console.Warn(fmt.Sprintf("ConfigMap %s not found in Namespace: %s. ConfigMap needs to be present in the same namespace as function", cfgMapName, fnNamespace))
|
console.Warn(fmt.Sprintf("ConfigMap %s not found in Namespace: %s. ConfigMap needs to be present in the same namespace as function", cfgMapName, fnNamespace))
|
||||||
} else {
|
} else {
|
||||||
return errors.Wrap(err, "error checking configmap")
|
return errors.Wrapf(err, "error checking configmap %s", cfgMapName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user