fix: container volumes
Build and Publish Container / Publish Linux container (push) Successful in 4m4s
Build and Publish Container / Publish Linux container (push) Successful in 4m4s
This commit is contained in:
@@ -116,6 +116,20 @@ class SteamCmdRunner:
|
||||
def available(self) -> bool:
|
||||
return self.executable_path() is not None
|
||||
|
||||
def ensure_workshop_writable(self) -> None:
|
||||
workshop_dir = self.content_dir.parent.parent
|
||||
try:
|
||||
workshop_dir.mkdir(parents=True, exist_ok=True)
|
||||
self.content_dir.mkdir(parents=True, exist_ok=True)
|
||||
probe = workshop_dir / ".progression-write-test"
|
||||
probe.write_text("ok", encoding="utf-8")
|
||||
probe.unlink()
|
||||
except OSError as error:
|
||||
raise PermissionError(
|
||||
f"SteamCMD Workshop directory is not writable: {workshop_dir}. "
|
||||
"Check the container volume ownership."
|
||||
) from error
|
||||
|
||||
def run_batch(
|
||||
self,
|
||||
workshop_ids: list[str],
|
||||
@@ -129,6 +143,7 @@ class SteamCmdRunner:
|
||||
invalid = [item for item in workshop_ids if not item.isdigit()]
|
||||
if invalid:
|
||||
raise ValueError(f"Invalid Workshop ids: {', '.join(invalid)}")
|
||||
self.ensure_workshop_writable()
|
||||
|
||||
command = [executable, "+login", "anonymous"]
|
||||
for workshop_id in workshop_ids:
|
||||
|
||||
Reference in New Issue
Block a user