Skip to content

Commit 1843d04

Browse files
committed
Test directory as admin user on 11.10
1 parent d70094d commit 1843d04

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

share/github-backup-utils/ghe-backup-userdata

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ ghe_remote_version_required "$host"
2525

2626
# Verify that the user data directory exists. Bail out if not, which may be due
2727
# to an older version of GHE or no data has been added to this directory yet.
28-
ghe-ssh "$host" -- "sudo -u git [ -d '$GHE_REMOTE_DATA_USER_DIR/$dirname' ]" || exit 0
28+
if [ "$GHE_VERSION_MAJOR" -ge 2 ]; then
29+
ghe-ssh "$host" -- "sudo -u git [ -d '$GHE_REMOTE_DATA_USER_DIR/$dirname' ]" || exit 0
30+
else
31+
ghe-ssh "$host" -- "[ -d '$GHE_REMOTE_DATA_USER_DIR/$dirname' ]" || exit 0
32+
fi
2933

3034
# If we have a previous increment and it is not empty, avoid transferring existing files via rsync's
3135
# --link-dest support. This also decreases physical space usage considerably.

0 commit comments

Comments
 (0)