Make git be able to clone into existing empty dirs

Needed if you want to alter the permissions on the directory
This commit is contained in:
Olivier 'reivilibre' 2020-11-08 19:52:09 +00:00
parent 91ccb70b0c
commit 8a42b277ff

View File

@ -322,7 +322,7 @@ class GitCheckout(Recipe):
# no non-arg dependencies
k.get_dependency_tracker()
stat = await k.ut1a(Stat(self.dest_dir), Stat.Result)
stat = await k.ut1a(Stat(self.dest_dir + "/.git"), Stat.Result)
if stat is None:
# doesn't exist; git init it
await exec_no_fails(k, ["git", "init", self.dest_dir], "/")