ensure correct permissions for output folder

This commit is contained in:
apkallum
2020-07-22 17:41:43 -04:00
parent 0aa3ee06a9
commit 0ed2a23670
3 changed files with 6 additions and 2 deletions

View File

@@ -43,7 +43,7 @@ def atomic_write(path: Union[Path, str], contents: Union[dict, str, bytes], over
dump(contents, f, indent=4, sort_keys=True, cls=ExtendedEncoder)
elif isinstance(contents, (bytes, str)):
f.write(contents)
os.chmod(path, int(OUTPUT_PERMISSIONS, base=8))
@enforce_types
def chmod_file(path: str, cwd: str='.', permissions: str=OUTPUT_PERMISSIONS) -> None: