MCPcopy Index your code
hub / github.com/ddev/ddev / GetComposerRoot

Method GetComposerRoot

pkg/ddevapp/ddevapp.go:665–681  ·  view source on GitHub ↗

GetComposerRoot will determine the absolute Composer root directory where all Composer related commands will be executed. If inContainer set to true, the absolute path in the container will be returned, else the absolute path on the host. If showWarning set to true, a warning containing the Composer

(inContainer, showWarning bool)

Source from the content-addressed store, hash-verified

663// If showWarning set to true, a warning containing the Composer root will be
664// shown to the user to avoid confusion.
665func (app *DdevApp) GetComposerRoot(inContainer, showWarning bool) string {
666 var absComposerRoot string
667
668 if inContainer {
669 absComposerRoot = path.Join(app.GetAbsAppRoot(true), app.ComposerRoot)
670 } else {
671 absComposerRoot = filepath.Join(app.GetAbsAppRoot(false), app.ComposerRoot)
672 }
673
674 // If requested, let the user know we are not using the default Composer
675 // root directory to avoid confusion.
676 if app.ComposerRoot != "" && showWarning {
677 util.Warning("Using '%s' as Composer root directory", absComposerRoot)
678 }
679
680 return absComposerRoot
681}
682
683// GetName returns the app's name
684func (app *DdevApp) GetName() string {

Calls 2

GetAbsAppRootMethod · 0.95
WarningFunction · 0.92

Tested by 2

shopware6PostStartActionFunction · 0.64