Skip to content

Commit 9785e32

Browse files
authored
Only include browsersync config if on a DDEV environment (#84)
1 parent dbcb079 commit 9785e32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/setup-wordpress-settings.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ echo "Adding wp-config-ddev-browsersync.php to: ${SETTINGS_FILE_NAME}"
3434
awk '
3535
/\/\/ Include for settings managed by ddev./ {
3636
print "/** Include for ddev-browsersync to modify WP_HOME and WP_SITEURL. */"
37-
print "$ddev_browsersync_settings = dirname( __FILE__ ) . \"/wp-config-ddev-browsersync.php\";"
38-
print "if ( is_readable( $ddev_browsersync_settings ) ) {"
37+
print "$ddev_browsersync_settings = __DIR__ . '\''/wp-config-ddev-browsersync.php'\'';"
38+
print "if ( getenv( '\''IS_DDEV_PROJECT'\'' ) == '\''true'\'' && is_readable( $ddev_browsersync_settings ) ) {"
3939
print " require_once( $ddev_browsersync_settings );"
4040
print "}"
4141
print ""

0 commit comments

Comments
 (0)