Skip to content

Commit

Permalink
Fix custom local target permissions.
Browse files Browse the repository at this point in the history
  • Loading branch information
riga committed Jan 16, 2025
1 parent f706599 commit feef358
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions law/target/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,8 @@ def dump(self, *args, **kwargs) -> Any:
ret = find_formatter(self.abspath, "dump", formatter).dump(self.abspath, *args, **kwargs)

# chmod
if perm is None:
perm = self.fs.default_file_perm
if perm and self.exists():
self.chmod(perm)

Expand Down Expand Up @@ -591,6 +593,8 @@ def localize(
# simply yield
yield self

if perm is None:
perm = self.fs.default_file_perm
self.chmod(perm, silent=True)


Expand Down

0 comments on commit feef358

Please sign in to comment.