vars fs: fix

This commit is contained in:
lassulus
2025-02-19 11:36:08 +01:00
committed by clan-bot
parent 3e0f9f52bb
commit ada544ef56
3 changed files with 5 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import shutil
import tempfile
from pathlib import Path
from clan_cli.machines.machines import Machine
@@ -13,7 +14,7 @@ class SecretStore(StoreBase):
def __init__(self, machine: Machine) -> None:
self.machine = machine
self.dir = Path("/run/secrets")
self.dir = Path(tempfile.gettempdir()) / "clan_secrets"
self.dir.mkdir(parents=True, exist_ok=True)
@property
@@ -42,6 +43,7 @@ class SecretStore(StoreBase):
if output_dir.exists():
shutil.rmtree(output_dir)
shutil.copytree(self.dir, output_dir)
shutil.rmtree(self.dir)
def upload(self, phases: list[str]) -> None:
msg = "Cannot upload secrets with FS backend"