Skip to content

Commit

Permalink
Merge pull request #113 from trickest/fix/machine-type-conversion
Browse files Browse the repository at this point in the history
Fix machine type conversion
  • Loading branch information
mhmdiaa authored Mar 8, 2024
2 parents 9752fd3 + f775800 commit 64458eb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmd/execute/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,16 @@ func handleSingleMachineType(fleet types.Fleet, machines types.Machines) (types.
defaultOrSelfHosted = *machines.Default
} else {
// Backward-compatibility with the small-medium-large format
defaultOrSelfHosted = *machines.Small + *machines.Medium + *machines.Large
if machines.Small != nil {
defaultOrSelfHosted += *machines.Small
}
if machines.Medium != nil {
defaultOrSelfHosted += *machines.Medium
}
if machines.Large != nil {
defaultOrSelfHosted += *machines.Large
}

fmt.Printf("Warning: You have one type of machine in your fleet. %d identical or self-hosted machines will be used.\n", defaultOrSelfHosted)
}

Expand Down

0 comments on commit 64458eb

Please sign in to comment.