aboutsummaryrefslogtreecommitdiff
path: root/lib/subcommands/sync.bash
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-03-06 11:04:33 +0100
committerPatrick Spek <p.spek@tyil.nl>2023-03-06 11:04:33 +0100
commite263f8606a9cbbe68595db68b4a56e34866a8d1d (patch)
tree1517a5a249d3a07881fea438f0c598ddb952d07d /lib/subcommands/sync.bash
parentf4ece68ecf8cfc855e54f2d5935ed2a2b8b0c4af (diff)
Various fixes to make the latest shellcheck pass
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