Create directory
This commit is contained in:
committed by
clan-bot
parent
e621aa1a34
commit
0d001e21b9
@@ -168,7 +168,8 @@ def deploy_machines(machines: list[Machine]) -> None:
|
|||||||
|
|
||||||
# Last output line (config store path) is printed to stdout instead of stderr
|
# Last output line (config store path) is printed to stdout instead of stderr
|
||||||
lines = ret.stdout.splitlines()
|
lines = ret.stdout.splitlines()
|
||||||
if lines: print(lines[-1])
|
if lines:
|
||||||
|
print(lines[-1])
|
||||||
|
|
||||||
if is_async_cancelled():
|
if is_async_cancelled():
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ import logging
|
|||||||
import os
|
import os
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from clan_cli.locked_open import locked_open
|
|
||||||
|
|
||||||
from clan_cli.cmd import run, run_no_stdout
|
from clan_cli.cmd import run, run_no_stdout
|
||||||
from clan_cli.dirs import nixpkgs_flake, nixpkgs_source
|
from clan_cli.dirs import nixpkgs_flake, nixpkgs_source
|
||||||
from clan_cli.errors import ClanError
|
from clan_cli.errors import ClanError
|
||||||
|
from clan_cli.locked_open import locked_open
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -65,7 +65,8 @@ def nix_test_store() -> Path | None:
|
|||||||
if not os.environ.get("IN_NIX_SANDBOX"):
|
if not os.environ.get("IN_NIX_SANDBOX"):
|
||||||
return None
|
return None
|
||||||
if store:
|
if store:
|
||||||
with locked_open(Path(store) / "lockfile"):
|
Path.mkdir(Path(store), exist_ok=True)
|
||||||
|
with locked_open(filename=Path(store) / "lockfile", mode="a"):
|
||||||
return Path(store)
|
return Path(store)
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user