Skip to content

Commit

Permalink
move error cause to top of err message
Browse files Browse the repository at this point in the history
  • Loading branch information
juanvallejo committed Oct 31, 2017
1 parent 6b1a836 commit 1acd699
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/oc/cli/cmd/set/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,12 +336,12 @@ func (o *ProbeOptions) Run() error {

obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch)
if err != nil {
handlePodUpdateError(o.Err, err, "probes")

// if no port was specified, inform that one must be provided
if len(o.HTTPGet) > 0 && len(o.HTTPGetAction.Port.String()) == 0 {
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")
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")
}
handlePodUpdateError(o.Err, err, "probes")

failed = true
continue
}
Expand Down

0 comments on commit 1acd699

Please sign in to comment.