mirror of
https://github.com/oskar456/dzonegit.git
synced 2024-05-11 05:55:41 +00:00
Fix crash of post-receive when checkout directory does not exist
This commit is contained in:
@ -434,6 +434,7 @@ def post_receive(stdin=sys.stdin):
|
||||
raise SystemExit("Checkout path not defined. Nothing to do.")
|
||||
|
||||
print("Checking out repository into {}…".format(checkoutpath))
|
||||
Path(checkoutpath).mkdir(parents=True, exist_ok=True)
|
||||
subprocess.run(
|
||||
["git", "checkout", "-f", "master"],
|
||||
check=True,
|
||||
|
Reference in New Issue
Block a user