Skip to content

Commit

Permalink
Rename RequireRouteAvailability
Browse files Browse the repository at this point in the history
  • Loading branch information
feloy committed Nov 17, 2021
1 parent e371a98 commit 5e029f7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/odo/cli/config/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func NewSetOptions() *SetOptions {
func (o *SetOptions) Complete(name string, cmd *cobra.Command, args []string) (err error) {
params := genericclioptions.NewCreateParameters(cmd).NeedDevfile(o.GetComponentContext())
if o.now {
params.CreateAppIfNeeded().CheckRouteAvailability()
params.CreateAppIfNeeded().RequireRouteAvailability()
}
o.Context, err = genericclioptions.New(params)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/odo/cli/config/unset.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func NewUnsetOptions() *UnsetOptions {
func (o *UnsetOptions) Complete(name string, cmd *cobra.Command, args []string) (err error) {
params := genericclioptions.NewCreateParameters(cmd).NeedDevfile(o.GetComponentContext())
if o.now {
params.CreateAppIfNeeded().CheckRouteAvailability()
params.CreateAppIfNeeded().RequireRouteAvailability()
}
o.Context, err = genericclioptions.New(params)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/odo/cli/url/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func NewURLCreateOptions() *CreateOptions {

// Complete completes CreateOptions after they've been Created
func (o *CreateOptions) Complete(_ string, cmd *cobra.Command, args []string) (err error) {
params := genericclioptions.NewCreateParameters(cmd).NeedDevfile(o.GetComponentContext()).CheckRouteAvailability()
params := genericclioptions.NewCreateParameters(cmd).NeedDevfile(o.GetComponentContext()).RequireRouteAvailability()
if o.now {
params.CreateAppIfNeeded()
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/odo/genericclioptions/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func NewCreateParameters(cmd *cobra.Command) CreateParameters {
return CreateParameters{cmd: cmd}
}

func (o CreateParameters) CheckRouteAvailability() CreateParameters {
func (o CreateParameters) RequireRouteAvailability() CreateParameters {
o.routeAvailability = true
return o
}
Expand Down

0 comments on commit 5e029f7

Please sign in to comment.