Skip to content

Commit ff9901d

Browse files
committed
Fix custom local target permissions.
1 parent 1d82bd4 commit ff9901d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

law/target/local.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,8 @@ def dump(self, *args, **kwargs):
429429
ret = find_formatter(self.abspath, "dump", formatter).dump(self.abspath, *args, **kwargs)
430430

431431
# chmod
432+
if perm is None:
433+
perm = self.fs.default_file_perm
432434
if perm and self.exists():
433435
self.chmod(perm)
434436

@@ -492,6 +494,8 @@ def localize(self, mode="r", perm=None, dir_perm=None, tmp_dir=None, **kwargs):
492494
# simply yield
493495
yield self
494496

497+
if perm is None:
498+
perm = self.fs.default_file_perm
495499
self.chmod(perm, silent=True)
496500

497501

0 commit comments

Comments
 (0)