Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
fix: replace machines
Browse files Browse the repository at this point in the history
  • Loading branch information
eliobischof committed Oct 14, 2022
1 parent 28aa46a commit f673e18
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/operator/orbiter/kinds/providers/cs/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ func (m *machine) initAction(a *action, getSlice func() []string, setSlice func(
if newAction.required {
newAction.unrequire = func() {
s := getSlice()
var withoutThisMachine []string
for sIdx := range s {
req := s[sIdx]
if req == m.ID() {
s = append(s[0:sIdx], s[sIdx+1:]...)
if req != m.ID() {
withoutThisMachine = append(withoutThisMachine, req)
}
}
setSlice(s)
setSlice(withoutThisMachine)
}
}

Expand Down

0 comments on commit f673e18

Please # to comment.