From 3451b71196a4beb632d7f9d37fdeee6ce4b4a811 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Tue, 20 Nov 2018 11:54:17 +0100 Subject: [PATCH] Silence pushd and popd output The output of pushd and popd can confuse drin users making them think that the output is relevant to Drupal when instead the usage of pushd and popd is just an implementation detail. Silence the output to avoid the confusion. --- libexec/bootstrap.sh | 4 ++-- libexec/create-profile.sh | 8 ++++---- libexec/new.sh | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libexec/bootstrap.sh b/libexec/bootstrap.sh index bb1968e..f1b0d7d 100755 --- a/libexec/bootstrap.sh +++ b/libexec/bootstrap.sh @@ -152,7 +152,7 @@ else echo " uri: 'http://localhost/${SITE_BASE_PATH}'" >> drush/drush.yml fi -pushd "$WEB_ROOT" +pushd "$WEB_ROOT" > /dev/null # Update the install_profile setting if it's already there if grep -q "^\\\$settings\['install_profile'\] =" sites/default/settings.php; @@ -249,4 +249,4 @@ then echo "in a split-core setup." fi -popd +popd > /dev/null diff --git a/libexec/create-profile.sh b/libexec/create-profile.sh index 57e3731..a8ce396 100755 --- a/libexec/create-profile.sh +++ b/libexec/create-profile.sh @@ -68,7 +68,7 @@ PROFILE_DEST_DIR="${PROJECT_ROOT}/${PROFILE_MACHINE_NAME}" [ -d "${PROFILE_DEST_DIR}" ] && { echo "Aborting, '${PROFILE_DEST_DIR}' already exists." 1>&2; exit 1; } -pushd "$WEB_ROOT" +pushd "$WEB_ROOT" > /dev/null CURRENT_PROFILE="$($DRUSH php-eval "echo drupal_get_profile();")" CURRENT_PROFILE_PATH="$($DRUSH php-eval "echo drupal_get_path('profile', '${CURRENT_PROFILE}');")" @@ -101,7 +101,7 @@ $DRUPAL_CONSOLE generate:profile \ --no-interaction # Copy private code and data from the currently installed profile -pushd "$CURRENT_PROFILE_PATH" +pushd "$CURRENT_PROFILE_PATH" > /dev/null find . -maxdepth 1 -type d ! -name "tests" -printf "%P\n" | while read -r dir; @@ -123,7 +123,7 @@ find . -maxdepth 1 -type f ! -name "*.info.yml" -printf "%P\n" | fi done -popd +popd > /dev/null # Basically do what's suggested in the "Configuration" section here: # https://www.drupal.org/docs/8/creating-distributions/how-to-write-a-drupal-8-installation-profile @@ -152,4 +152,4 @@ then echo "Check that the code of the created profile refers to the new profile name." fi -popd +popd > /dev/null diff --git a/libexec/new.sh b/libexec/new.sh index 890b1d0..c083b59 100755 --- a/libexec/new.sh +++ b/libexec/new.sh @@ -60,7 +60,7 @@ command -v git &> /dev/null || { echo "Aborting, 'git' not available." 1>&2; exi echo "Creating a new Drupal project..." composer create-project drupal-composer/drupal-project:8.x-dev@dev "$DESTDIR" --keep-vcs --stability dev --no-interaction -pushd "$DESTDIR" +pushd "$DESTDIR" > /dev/null git remote rename origin upstream git checkout -b master @@ -140,4 +140,4 @@ echo echo "Double check the provided .htaccess file to make sure that access to" echo "'$PWD' is restricted by the web server." -popd +popd > /dev/null -- 2.1.4