Skip to content

Commit 17141c1

Browse files
committed
Softly fail if not able to read hooks
1 parent 89df625 commit 17141c1

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

bin/github-backup

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,14 @@ def backup_hooks(args, repo_cwd, repository, repos_template):
598598
output_file = '{0}/hooks.json'.format(hook_cwd)
599599
template = '{0}/{1}/hooks'.format(repos_template,
600600
repository['full_name'])
601-
_backup_data(args,
602-
'hooks',
603-
template,
604-
output_file,
605-
hook_cwd)
601+
try:
602+
_backup_data(args,
603+
'hooks',
604+
template,
605+
output_file,
606+
hook_cwd)
607+
except SystemExit:
608+
log_info("Unable to read hooks, skipping")
606609

607610

608611
def fetch_repository(name, remote_url, local_dir, skip_existing=False):

0 commit comments

Comments
 (0)