@@ -15,7 +15,7 @@ WP_VERSION=${5-latest}
1515SKIP_DB_CREATE=${6-false}
1616
1717TMPDIR=${TMPDIR-/ tmp}
18- TMPDIR=$( echo $TMPDIR | sed -e " s/\/$//" )
18+ TMPDIR=$( echo " $TMPDIR " | sed -e " s/\/$//" )
1919WP_TESTS_DIR=${WP_TESTS_DIR-$TMPDIR / wordpress-tests-lib}
2020WP_CORE_DIR=${WP_CORE_DIR-$TMPDIR / wordpress/ }
2121
@@ -67,7 +67,7 @@ install_wp() {
6767 mkdir -p $TMPDIR /wordpress-nightly
6868 download https://wordpress.org/nightly-builds/wordpress-latest.zip $TMPDIR /wordpress-nightly/wordpress-nightly.zip
6969 unzip -q $TMPDIR /wordpress-nightly/wordpress-nightly.zip -d $TMPDIR /wordpress-nightly/
70- mv $TMPDIR /wordpress-nightly/wordpress/* $WP_CORE_DIR
70+ mv " $TMPDIR " /wordpress-nightly/wordpress/* $WP_CORE_DIR
7171 else
7272 if [ $WP_VERSION == ' latest' ]; then
7373 local ARCHIVE_NAME=' latest'
@@ -79,7 +79,7 @@ install_wp() {
7979 LATEST_VERSION=${WP_VERSION% ??}
8080 else
8181 # otherwise, scan the releases and get the most up to date minor version of the major release
82- local VERSION_ESCAPED=` echo $WP_VERSION | sed ' s/\./\\\\./g' `
82+ local VERSION_ESCAPED=` echo " $WP_VERSION " | sed ' s/\./\\\\./g' `
8383 LATEST_VERSION=$( grep -o ' "version":"' $VERSION_ESCAPED ' [^"]*' $TMPDIR /wp-latest.json | sed ' s/"version":"//' | head -1)
8484 fi
8585 if [[ -z " $LATEST_VERSION " ]]; then
@@ -116,7 +116,7 @@ install_test_suite() {
116116 if [ ! -f wp-tests-config.php ]; then
117117 download https://develop.svn.wordpress.org/${WP_TESTS_TAG} /wp-tests-config-sample.php " $WP_TESTS_DIR " /wp-tests-config.php
118118 # remove all forward slashes in the end
119- WP_CORE_DIR=$( echo $WP_CORE_DIR | sed " s:/\+$::" )
119+ WP_CORE_DIR=$( echo " $WP_CORE_DIR " | sed " s:/\+$::" )
120120 sed $ioption " s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR /':" " $WP_TESTS_DIR " /wp-tests-config.php
121121 sed $ioption " s/youremptytestdbnamehere/$DB_NAME /" " $WP_TESTS_DIR " /wp-tests-config.php
122122 sed $ioption " s/yourusernamehere/$DB_USER /" " $WP_TESTS_DIR " /wp-tests-config.php
@@ -139,7 +139,7 @@ install_db() {
139139 local EXTRA=" "
140140
141141 if ! [ -z $DB_HOSTNAME ] ; then
142- if [ $( echo $DB_SOCK_OR_PORT | grep -e ' ^[0-9]\{1,\}$' ) ]; then
142+ if [ $( echo " $DB_SOCK_OR_PORT " | grep -e ' ^[0-9]\{1,\}$' ) ]; then
143143 EXTRA=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp"
144144 elif ! [ -z $DB_SOCK_OR_PORT ] ; then
145145 EXTRA=" --socket=$DB_SOCK_OR_PORT "
0 commit comments