Skip to content

Commit a0e1357

Browse files
committed
[runtests] Make sure repos contain a hooks directory
Some git configurations (like mine, as it turns out) don't include that directory when using git init.
1 parent bd7a47c commit a0e1357

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

runtests.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,6 +1121,11 @@ def removeUpdateHook(cls):
11211121
@classmethod
11221122
def setUpClass(cls):
11231123
super(GitHubPostCommitHookWithUpdateHookTests, cls).setUpClass()
1124+
# Make sure the hooks directory exists in the repo (can be disabled in some git configs)
1125+
try:
1126+
os.mkdir(d('%s-mirror' % GIT, 'hooks'))
1127+
except OSError:
1128+
pass
11241129
cls.createUpdateHook()
11251130

11261131
@classmethod

0 commit comments

Comments
 (0)