Add org check to avoid incorrect log output

This commit is contained in:
W. Harrison Wright
2018-12-27 12:58:57 -06:00
parent b70ea87db7
commit 4b459f9af8

View File

@@ -536,7 +536,7 @@ def retrieve_repositories(args, authenticated_user):
template = 'https://{0}/user/repos'.format(
get_github_api_host(args))
else:
if args.private:
if args.private and not args.organization:
log_warning('Authenticated user is different from user being backed up, thus private repositories cannot be accessed')
template = 'https://{0}/users/{1}/repos'.format(
get_github_api_host(args),