Fix locking
This commit is contained in:
committed by
clan-bot
parent
014aec9531
commit
cb89fb0847
@@ -3,6 +3,7 @@ import logging
|
||||
import os
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
from clan_cli.locked_open import locked_open
|
||||
|
||||
from clan_cli.cmd import run, run_no_stdout
|
||||
from clan_cli.dirs import nixpkgs_flake, nixpkgs_source
|
||||
@@ -60,10 +61,11 @@ def nix_config() -> dict[str, Any]:
|
||||
|
||||
|
||||
def nix_test_store() -> Path | None:
|
||||
store = os.environ.get("CLAN_TEST_STORE", None)
|
||||
if not os.environ.get("IN_NIX_SANDBOX"):
|
||||
return None
|
||||
store = os.environ.get("CLAN_TEST_STORE", None)
|
||||
if store:
|
||||
with locked_open(Path(store) / "lockfile"):
|
||||
return Path(store)
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user