Skip to content

Commit

Permalink
fixed --retain bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lreciomelero committed Feb 14, 2023
1 parent 91f831c commit 16aa97a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pkg/cluster/createoption.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,17 @@ func CreateWithRetain(retain bool) CreateOption {
}

func CreateWithMove(move bool) CreateOption {
return CreateWithRetain(move)
return createOptionAdapter(func(o *internalcreate.ClusterOptions) error {
o.Retain = move || o.Retain
return nil
})
}

func CreateWithAvoidCreation(avoidCreation bool) CreateOption {
return CreateWithRetain(avoidCreation)
return createOptionAdapter(func(o *internalcreate.ClusterOptions) error {
o.Retain = avoidCreation || o.Retain
return nil
})
}

// CreateWithWaitForReady configures a maximum wait time for the control plane
Expand Down

0 comments on commit 16aa97a

Please sign in to comment.