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)
| 663 | // If showWarning set to true, a warning containing the Composer root will be |
| 664 | // shown to the user to avoid confusion. |
| 665 | func (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 |
| 684 | func (app *DdevApp) GetName() string { |