Skip to content

Commit feef358

Browse files
committed
Fix custom local target permissions.
1 parent f706599 commit feef358

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
@@ -518,6 +518,8 @@ def dump(self, *args, **kwargs) -> Any:
518518
ret = find_formatter(self.abspath, "dump", formatter).dump(self.abspath, *args, **kwargs)
519519

520520
# chmod
521+
if perm is None:
522+
perm = self.fs.default_file_perm
521523
if perm and self.exists():
522524
self.chmod(perm)
523525

@@ -591,6 +593,8 @@ def localize(
591593
# simply yield
592594
yield self
593595

596+
if perm is None:
597+
perm = self.fs.default_file_perm
594598
self.chmod(perm, silent=True)
595599

596600

0 commit comments

Comments
 (0)