Skip to content

Commit

Permalink
fix: make drupal detection only detect drupal8+ (ddev#6652) [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay authored Oct 28, 2024
1 parent 64b7a80 commit 6acaae7
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions pkg/ddevapp/drupal.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"os"
"path"
"path/filepath"
"strconv"
"text/template"

"github.com/ddev/ddev/pkg/archive"
Expand Down Expand Up @@ -341,10 +342,18 @@ func GetDrupalVersion(app *DdevApp) (string, error) {
return v, err
}

// isDrupalApp returns true if the app is drupal
// isDrupalApp returns true if the app is drupal (drupal8+)
func isDrupalApp(app *DdevApp) bool {
v, err := GetDrupalVersion(app)
if err == nil && v != "" {
vStr, err := GetDrupalVersion(app)
if err != nil {
return false
}
v, err := strconv.Atoi(vStr)
if err != nil {
return false
}

if v >= 8 {
return true
}
return false
Expand Down

0 comments on commit 6acaae7

Please sign in to comment.