Skip to content

Commit

Permalink
Don't try to assign to nil app.Name in GetProjects(), fixes #2483 (#2484
Browse files Browse the repository at this point in the history
)
  • Loading branch information
rfay committed Sep 2, 2020
1 parent 1f90639 commit 6c04f39
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/ddevapp/utils.go
Expand Up @@ -351,13 +351,14 @@ func GetProjects(activeOnly bool) ([]*DdevApp, error) {

app, err := NewApp(info.AppRoot, true, nodeps.ProviderDefault)
if err != nil {
util.Warning("unable to create project at project root %s: %v", info.AppRoot, err)
app.Name = name
util.Warning("unable to create project at project root '%s': %v", info.AppRoot, err)
continue
}

// If the app we just loaded was already found with a different name, complain
if _, ok := apps[app.Name]; ok {
util.Warning(`Project '%s' was found in configured directory %s and it is already used by project '%s'. If you have changed the name of the project, please "ddev stop --unlist %s" `, app.Name, app.AppRoot, name, name)
continue
}

if !activeOnly || (app.SiteStatus() != SiteStopped && app.SiteStatus() != SiteConfigMissing && app.SiteStatus() != SiteDirMissing) {
Expand Down

0 comments on commit 6c04f39

Please sign in to comment.