Skip to content

Commit 4aa56fe

Browse files
committed
fix: improve liqoctl uninstall error message
this patch improves the liqoctl uninstall error message when the pre-uninstall checks fail, by suggesting the user which command has to be used to unpeer a cluster.
1 parent 7abcb94 commit 4aa56fe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/liqoctl/uninstall/handler.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ func (o *Options) Run(ctx context.Context) error {
6666

6767
s := o.Printer.StartSpinner("Running pre-uninstall checks")
6868
if err := utils.PreUninstall(ctx, o.CRClient); err != nil {
69-
s.Fail("Pre-uninstall checks failed: ", output.PrettyErr(err))
69+
errMsg := fmt.Sprintf("Pre-uninstall checks failed: %s\n"+
70+
"You can disable the active peerings with other clusters with the 'liqoctl unpeer' command.\n"+
71+
"Check 'liqoctl unpeer --help' for further information.", output.PrettyErr(err))
72+
s.Fail(errMsg)
7073
return err
7174
}
7275
s.Success("Pre-uninstall checks passed")

0 commit comments

Comments
 (0)