Skip to content

Commit 1acd699

Browse files
committed
move error cause to top of err message
bug https://bugzilla.redhat.com/show_bug.cgi?id=1332871
1 parent 6b1a836 commit 1acd699

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/oc/cli/cmd/set/probe.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -336,12 +336,12 @@ func (o *ProbeOptions) Run() error {
336336

337337
obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch)
338338
if err != nil {
339-
handlePodUpdateError(o.Err, err, "probes")
340-
341339
// if no port was specified, inform that one must be provided
342340
if len(o.HTTPGet) > 0 && len(o.HTTPGetAction.Port.String()) == 0 {
343-
fmt.Fprintf(o.Err, "\nA port must be specified as part of a url (http://127.0.0.1:3306).\nSee 'oc set probe -h' for help and examples.\n")
341+
fmt.Fprintf(o.Err, "A port must be specified as part of a url (http://127.0.0.1:3306).\n\nSee 'oc set probe -h' for help and examples.\n")
344342
}
343+
handlePodUpdateError(o.Err, err, "probes")
344+
345345
failed = true
346346
continue
347347
}

0 commit comments

Comments
 (0)