Skip to content

Commit dbcb079

Browse files
authored
Updating the scripts to resolve [: !=: unary operator expected errors (#83)
1 parent 4b8238c commit dbcb079

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

install.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ removal_actions:
4646
- |
4747
#ddev-nodisplay
4848
#ddev-description:Remove browsersync settings for WordPress if applicable
49-
if [ $DDEV_DOCROOT != "" ]; then
49+
if [ "$DDEV_DOCROOT" != "" ]; then
5050
DDEV_SITE_PATH="${DDEV_APPROOT}/${DDEV_DOCROOT}" ;
5151
else
5252
DDEV_SITE_PATH=$DDEV_APPROOT
@@ -55,7 +55,7 @@ removal_actions:
5555
scripts/remove-wordpress-settings.sh
5656
# Don't automatically renable settings management in case user didn't have it enabled in the first place
5757
- |
58-
if [[ $DDEV_PROJECT_TYPE = 'wordpress' ]]; then
58+
if [ "$DDEV_PROJECT_TYPE" = "wordpress" ]; then
5959
echo "Note: You may wish to renable ddev's management of the wp-config file:"
6060
echo " Run 'ddev config --disable-settings-management=false && ddev restart'"
6161
fi

scripts/remove-wordpress-settings.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ddev-generated
33
set -e
44

5-
if [[ $DDEV_PROJECT_TYPE != wordpress ]] ;
5+
if [[ "$DDEV_PROJECT_TYPE" != "wordpress" ]] ;
66
then
77
exit 0
88
fi
@@ -11,7 +11,7 @@ fi
1111
# exit 0
1212
# fi
1313

14-
if [ $DDEV_DOCROOT != "" ]; then
14+
if [ "$DDEV_DOCROOT" != "" ]; then
1515
DDEV_SITE_PATH="${DDEV_APPROOT}/${DDEV_DOCROOT}" ;
1616
else
1717
DDEV_SITE_PATH=$DDEV_APPROOT

scripts/setup-wordpress-settings.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ddev-generated
33
set -e
44

5-
if [[ $DDEV_PROJECT_TYPE != wordpress ]] ;
5+
if [[ "$DDEV_PROJECT_TYPE" != "wordpress" ]] ;
66
then
77
exit 0
88
fi
@@ -11,7 +11,7 @@ fi
1111
# exit 0
1212
# fi
1313

14-
if [ $DDEV_DOCROOT != "" ]; then
14+
if [ "$DDEV_DOCROOT" != "" ]; then
1515
DDEV_SITE_PATH="${DDEV_APPROOT}/${DDEV_DOCROOT}" ;
1616
else
1717
DDEV_SITE_PATH=$DDEV_APPROOT
@@ -29,7 +29,7 @@ if grep -q "/\*\* Include for ddev-browsersync to modify WP_HOME and WP_SITEURL.
2929
fi
3030

3131
echo "Adding wp-config-ddev-browsersync.php to: ${SETTINGS_FILE_NAME}"
32-
32+
3333
# Append our code before the ddev config comment.
3434
awk '
3535
/\/\/ Include for settings managed by ddev./ {

0 commit comments

Comments
 (0)