make cargo lock updater keep outpath links in temporary directory

This commit is contained in:
Lily Foster 2024-03-06 06:48:44 -05:00
parent 37e9b32f33
commit f80ee70b1d
No known key found for this signature in database
GPG Key ID: 49340081E484C893

View File

@ -163,10 +163,13 @@ def update_cargo_deps_hash(opts: Options, filename: str, current_hash: str) -> N
def update_cargo_lock(
opts: Options, filename: str, dst: CargoLockInSource | CargoLockInStore
) -> None:
with tempfile.TemporaryDirectory() as tempdir:
res = run(
[
"nix",
"build",
"--out-link",
f"{tempdir}/result",
"--impure",
"--print-out-paths",
"--expr",