scripts/symlink-update-hook.py: fix conditionals

Otherwise this would fail to update all of the symlinks if any of them
were already correct.
This commit is contained in:
Drew DeVault 2020-02-17 11:38:50 -05:00
parent 17c9530ea1
commit 281891b07d
1 changed files with 2 additions and 2 deletions

View File

@ -25,6 +25,6 @@ def migrate(path, link):
for repo in Repository.query.all():
if migrate(os.path.join(repo.path, "hooks", "update"), post_update) \
and migrate(os.path.join(repo.path, "hooks", "post-update"), post_update) \
and migrate(os.path.join(repo.path, "hooks", "pre-receive"), post_update):
or migrate(os.path.join(repo.path, "hooks", "post-update"), post_update) \
or migrate(os.path.join(repo.path, "hooks", "pre-receive"), post_update):
print("Migrated {}".format(repo.name))