Fix file wrong file permissions in Git hook.

This commit is contained in:
Sam Bull 2020-06-10 10:11:34 +00:00
parent a7be77f761
commit 7fb1bc87a9

View file

@ -152,6 +152,7 @@ def copy_file_to(destination_directory, filepath, contents):
temporary_filepath = os.path.join(temporary_directory, filename)
with open(temporary_filepath, "wb") as fd:
fd.write(contents)
shutil.copystat(filepath, temporary_filepath)
return temporary_filepath