We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9d9bb7 commit e024a97Copy full SHA for e024a97
1 file changed
gitbackup
@@ -3,7 +3,7 @@
3
# GitBackup - Automated Git Repository Backup Manager
4
# Version: 1.0.0
5
6
-set -e
+# Don't use set -e as git commands may return non-zero exit codes normally
7
8
VERSION="1.0.0"
9
SCRIPT_NAME="gitbackup"
@@ -208,7 +208,11 @@ list_repos() {
208
continue
209
fi
210
211
- cd "$repo"
+ # Try to cd to repo, skip if it fails
212
+ if ! cd "$repo" 2>/dev/null; then
213
+ echo -e "${RED}[$count]${NC} ${RED}[ACCESS DENIED]${NC} $repo"
214
+ continue
215
+ fi
216
217
# Get repo name
218
local repo_name=$(basename "$repo")
0 commit comments