Skip to content

Commit

Permalink
fix: error check
Browse files Browse the repository at this point in the history
  • Loading branch information
arti-shalb committed Oct 20, 2023
1 parent e58efdd commit 598897f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/project/unit.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ func NewUnit(spec map[string]interface{}, stack *Stack) (Unit, error) {
return nil, fmt.Errorf("incorrect unit type")
}
uName, ok := spec["name"].(string)
if !ok {
return nil, fmt.Errorf("incorrect unit name")
}
modDrv, exists := UnitFactoriesMap[mType]
// TODO remove deprecated unit type 'kubernetes'
// if mType == "kubernetes" {
Expand Down

0 comments on commit 598897f

Please sign in to comment.