aboutsummaryrefslogtreecommitdiff
path: root/lib/subcommands/sync.bash
diff options
context:
space:
mode:
Diffstat (limited to 'lib/subcommands/sync.bash')
-rw-r--r--lib/subcommands/sync.bash8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/subcommands/sync.bash b/lib/subcommands/sync.bash
index 9537922..e2eac77 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" > /dev/null
+ pushd -- "$BASHTARD_ETCDIR" > /dev/null || return 4
git pull origin master || return 4
- popd > /dev/null
+ popd > /dev/null || return 4
# Otherwise, do a full sync
notice "bashtard/sync" "Syncing remote playbooks"
@@ -29,7 +29,7 @@ subcommand()
pushd -- "$BASHTARD_ETCDIR/playbooks.d/$playbook" > /dev/null \
|| return 2
git pull origin "$branch"
- popd > /dev/null
+ popd > /dev/null || return 2
done < "$BASHTARD_ETCDIR/playbooks.d/remotes"
# Run a sync for each registered playbook for this host
@@ -58,7 +58,7 @@ sync_playbook()
return 1
fi
- # shellcheck disable=SC1090
+ # shellcheck disable=SC1090,SC1091
. "$playbook_base/playbook.bash"
playbook_sync