wrap the error optimize the show info

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
This commit is contained in:
楚岳
2022-05-31 17:48:25 +08:00
parent 6eefcd2c14
commit 00ad8304c8
+1 -1
View File
@@ -368,7 +368,7 @@ func enableAddon(ctx context.Context, k8sClient client.Client, dc *discovery.Dis
}
if err != nil {
if errors.As(err, &pkgaddon.VersionUnMatchError{}) {
fmt.Printf("this version of addon cannot meet system requirement, you can try another version by command: \"vela addon enable %s --version <version> \" ", name)
return fmt.Errorf("%v\n you can try another version by command: \"vela addon enable %s --version <version> \" ", err, name)
}
return err
}