clan-cli: improve log messages further
nix fmt
This commit is contained in:
@@ -589,6 +589,7 @@ class FlakeCache:
|
|||||||
|
|
||||||
def load_from_file(self, path: Path) -> None:
|
def load_from_file(self, path: Path) -> None:
|
||||||
with path.open("r") as f:
|
with path.open("r") as f:
|
||||||
|
log.debug("Loading flake cache from file")
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
self.cache = FlakeCacheEntry.from_json(data["cache"])
|
self.cache = FlakeCacheEntry.from_json(data["cache"])
|
||||||
|
|
||||||
@@ -682,6 +683,8 @@ class Flake:
|
|||||||
]
|
]
|
||||||
|
|
||||||
trace_prefetch = os.environ.get("CLAN_DEBUG_NIX_PREFETCH", "0") == "1"
|
trace_prefetch = os.environ.get("CLAN_DEBUG_NIX_PREFETCH", "0") == "1"
|
||||||
|
if not trace_prefetch:
|
||||||
|
log.debug(f"Prefetching flake {self.identifier}")
|
||||||
flake_prefetch = run(nix_command(cmd), RunOpts(trace=trace_prefetch))
|
flake_prefetch = run(nix_command(cmd), RunOpts(trace=trace_prefetch))
|
||||||
flake_metadata = json.loads(flake_prefetch.stdout)
|
flake_metadata = json.loads(flake_prefetch.stdout)
|
||||||
self.store_path = flake_metadata["storePath"]
|
self.store_path = flake_metadata["storePath"]
|
||||||
|
|||||||
Reference in New Issue
Block a user