Skip to content

Commit

Permalink
Merge pull request #37 from convox/fix-latest-release
Browse files Browse the repository at this point in the history
changing return broke formation
  • Loading branch information
mattmanning committed Sep 18, 2015
2 parents 20b05c8 + b923b91 commit 7c8c7ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/models/app.go
Expand Up @@ -272,7 +272,7 @@ func (a *App) LatestRelease() (*Release, error) {
}

if len(releases) == 0 {
return nil, fmt.Errorf("no releases for app: %s", a.Name)
return nil, nil
}

return &releases[0], nil
Expand All @@ -297,6 +297,10 @@ func (a *App) RunAttached(process, command string, rw io.ReadWriter) error {
return err
}

if release == nil {
return fmt.Errorf("no releases for app: %s", a.Name)
}

manifest, err := LoadManifest(release.Manifest)

if err != nil {
Expand Down

0 comments on commit 7c8c7ba

Please sign in to comment.