Skip to content

Commit

Permalink
fix(sass): Windows archive is called by bat file
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Dec 1, 2024
1 parent af750d8 commit 8882768
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/atsphinx/toybox/sass/dart_sass.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def file_ext(self) -> str:
return "zip" if self.os == "windows" else "tar.gz"

@property
def bin_ext(self) -> str:
def exec_ext(self) -> str:
"""Extension of executable file."""
return ".exe" if self.os == "windows" else ""
return ".bat" if self.os == "windows" else ""


def resolve_os() -> OS_NAME:
Expand Down Expand Up @@ -89,7 +89,7 @@ def resolve_arch() -> ARCH_NAME:
def setup_dart_sass(version: str, dist: Path) -> Path:
"""If executable is not exists, download archive."""
release = Release.from_platform(version)
fullpath = dist / "dart-sass" / f"sass{release.bin_ext}"
fullpath = dist / "dart-sass" / f"sass{release.exec_ext}"
if not fullpath.exists():
logger.debug(f"Binary archive is {release.archive_url}")
resp = httpx.get(release.archive_url, follow_redirects=True)
Expand Down

0 comments on commit 8882768

Please sign in to comment.