Skip to content

Commit

Permalink
Fix missing directory creation in AssetMinifierStep (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
pydsigner committed Nov 4, 2023
1 parent 7ceef66 commit ed71c1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/anchovy/minify.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ def __call__(self, path: Path, output_paths: list[Path]):
if not (mime := self.mimetype or self.detect_mime(path)):
raise ValueError(f'Could not detect MIME type for {path}!')

for o_path in output_paths:
o_path.parent.mkdir(parents=True, exist_ok=True)
minify.file(mime, str(path), str(output_paths[0]))
for o_path in output_paths[1:]:
shutil.copy(output_paths[0], o_path)

0 comments on commit ed71c1b

Please sign in to comment.