Skip to content

Commit 4b2a8ee

Browse files
committed
refactor: Use .ddev/.env.web for Craft CMS DDEV settings, for ddev#7233
1 parent 51accd1 commit 4b2a8ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/ddevapp/craftcms.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func craftCmsPostStartAction(app *DdevApp) error {
7878
}
7979

8080
// If the .env file doesn't exist, try to create it by copying .env.example to .env
81-
envFilePath := filepath.Join(app.AppRoot, app.ComposerRoot, ".env")
81+
envFilePath := app.GetConfigPath(".env.web")
8282
if !fileutil.FileExists(envFilePath) {
8383
var exampleEnvFilePaths = []string{".env.example", ".env.example.dev"}
8484
for _, envFileName := range exampleEnvFilePaths {
@@ -101,7 +101,7 @@ func craftCmsPostStartAction(app *DdevApp) error {
101101
// Read in the .env file
102102
envMap, envText, err := ReadProjectEnvFile(envFilePath)
103103
if err != nil && !os.IsNotExist(err) {
104-
return fmt.Errorf("unable to read .env file: %v", err)
104+
return fmt.Errorf("unable to read %s: %v", envFilePath, err)
105105
}
106106

107107
port := "3306"

0 commit comments

Comments
 (0)