Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/aleph_client/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import logging
import os
import re
import shutil
import subprocess
import sys
from asyncio import ensure_future
Expand Down Expand Up @@ -48,7 +49,11 @@ def create_archive(path: Path) -> tuple[Path, Encoding]:
if settings.CODE_USES_SQUASHFS:
logger.debug("Creating squashfs archive...")
archive_path = Path(f"{path}.squashfs")
subprocess.check_call(["/usr/bin/mksquashfs", path, archive_path, "-noappend"])
mksquashfs_path = shutil.which("mksquashfs")
if not mksquashfs_path:
msg = "mksquashfs not found in PATH"
raise FileNotFoundError(msg)
subprocess.check_call([mksquashfs_path, path, archive_path, "-noappend"])
assert archive_path.is_file()
return archive_path, Encoding.squashfs
else:
Expand Down
Loading