ソースを参照

remove nil services check (#3277)

* define types at api layer and remove cli import

* check for null map

* explicit ifs

* remove nil services check
ianedwards 2 年 前
コミット
e40a2dc27c
2 ファイル変更0 行追加9 行削除
  1. 0 5
      api/server/handlers/porter_app/parse.go
  2. 0 4
      cli/cmd/apply.go

+ 0 - 5
api/server/handlers/porter_app/parse.go

@@ -168,11 +168,6 @@ func parse(conf ParseConf) (*chart.Chart, map[string]interface{}, map[string]int
 		services = parsed.Services
 		services = parsed.Services
 	}
 	}
 
 
-	if services == nil {
-		return nil, nil, nil, fmt.Errorf("missing services from porter yaml file")
-	}
-
-
 	application := &Application{
 	application := &Application{
 		Env:      parsed.Env,
 		Env:      parsed.Env,
 		Services: services,
 		Services: services,

+ 0 - 4
cli/cmd/apply.go

@@ -201,10 +201,6 @@ func apply(_ *types.GetAuthenticatedUserResponse, client *api.Client, _ []string
 				services = parsed.Services
 				services = parsed.Services
 			}
 			}
 
 
-			if services == nil {
-				return fmt.Errorf("missing services from porter yaml file")
-			}
-
 			app := &stack.Application{
 			app := &stack.Application{
 				Env:      parsed.Env,
 				Env:      parsed.Env,
 				Services: services,
 				Services: services,