Let git clean fail
It exists with 1 in case the build has failed right before it (maybe it's racy..) Let's hope this doesn't make a difference.
This commit is contained in:
parent
c6dc768310
commit
d43b438c7c
@ -62,7 +62,12 @@ def fresh_git_repo(url, path):
|
|||||||
yield
|
yield
|
||||||
finally:
|
finally:
|
||||||
assert os.path.exists(path)
|
assert os.path.exists(path)
|
||||||
check_call(["git", "clean", "-xfdf"], cwd=path)
|
try:
|
||||||
|
check_call(["git", "clean", "-xfdf"], cwd=path)
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
# sometimes it fails right after the build has failed
|
||||||
|
# not sure why
|
||||||
|
pass
|
||||||
check_call(["git", "reset", "--hard", "HEAD"], cwd=path)
|
check_call(["git", "reset", "--hard", "HEAD"], cwd=path)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user