From 2b743dbff69bc817cafcd3780d183688156aadd1 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 28 Dec 2024 08:59:15 -0700 Subject: [PATCH] Check if a project uses Git before syncing. --- tasks/general/acct_mgmt/users.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index abd3564..4f29ab3 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -453,8 +453,12 @@ ls -d ~/Code/* | while read project; do echo "*** `basename $project` ***" cd $project - git pull - git push + if [[ -d .git ]]; then + git pull + git push + else + echo "Not a Git project, skipping!" + fi done ' alias_code_reset: |