MCPcopy Create free account
hub / github.com/ddev/ddev / CheckExistingAppInApproot

Method CheckExistingAppInApproot

pkg/ddevapp/ddevapp.go:2325–2333  ·  view source on GitHub ↗

CheckExistingAppInApproot looks to see if we already have a project in this approot with different name

()

Source from the content-addressed store, hash-verified

2323
2324// CheckExistingAppInApproot looks to see if we already have a project in this approot with different name
2325func (app *DdevApp) CheckExistingAppInApproot() error {
2326 pList := globalconfig.GetGlobalProjectList()
2327 for name, v := range pList {
2328 if app.AppRoot == v.AppRoot && name != app.Name {
2329 return fmt.Errorf(`this project root '%s' already contains a project named '%s'. You may want to remove the existing project with "ddev stop --unlist %s"`, v.AppRoot, name, name)
2330 }
2331 }
2332 return nil
2333}
2334
2335//go:embed webserver_config_assets
2336var webserverConfigAssets embed.FS

Callers 4

projectNamePromptMethod · 0.95
StartMethod · 0.95
handleConfigRunFunction · 0.80
handleMainConfigArgsFunction · 0.80

Calls 2

GetGlobalProjectListFunction · 0.92
ErrorfMethod · 0.80

Tested by

no test coverage detected