Skip to content

Commit

Permalink
fix to pass directories in middlewares that are not middleware modules
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelarkn committed Jan 4, 2018
1 parent 6767b18 commit 2569347
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion codegen/gateway.go
Expand Up @@ -947,7 +947,10 @@ func parseMiddlewareConfig(
}
instanceConfig := filepath.Join(fullMiddlewareDir, file.Name(), "middleware-config.json")
bytes, err := ioutil.ReadFile(instanceConfig)
if err != nil {
if os.IsNotExist(err) {
fmt.Printf("Could not read config file for middleware directory \"%s\" skipping...\n", file.Name())
continue
} else if err != nil {
return nil, errors.Wrapf(
err, "Cannot read middleware config json: %s",
instanceConfig,
Expand Down

0 comments on commit 2569347

Please sign in to comment.