From 333ba3fbe568dd62bd9bc687e56975c06a2b85b5 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Wed, 20 Apr 2022 12:08:39 +0200 Subject: Silence output of pushd/popd --- lib/subcommands/sync.bash | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/subcommands/sync.bash b/lib/subcommands/sync.bash index 4c193e1..9537922 100644 --- a/lib/subcommands/sync.bash +++ b/lib/subcommands/sync.bash @@ -16,9 +16,9 @@ subcommand() fi notice "bashtard/sync" "Syncing $BASHTARD_ETCDIR" - pushd -- "$BASHTARD_ETCDIR" - git pull origin master - popd + pushd -- "$BASHTARD_ETCDIR" > /dev/null + git pull origin master || return 4 + popd > /dev/null # Otherwise, do a full sync notice "bashtard/sync" "Syncing remote playbooks" @@ -26,10 +26,10 @@ subcommand() # Update all playbook sources while read -r playbook _ branch do - pushd -- "$BASHTARD_ETCDIR/playbooks.d/$playbook" \ + pushd -- "$BASHTARD_ETCDIR/playbooks.d/$playbook" > /dev/null \ || return 2 git pull origin "$branch" - popd + popd > /dev/null done < "$BASHTARD_ETCDIR/playbooks.d/remotes" # Run a sync for each registered playbook for this host -- cgit v1.1