refactor(tvix/derivation): use StorePath::to_absolute_path()

Instead of concatenating STORE_DIR manually, use
StorePath::to_absolute_path() that does it for us.

Change-Id: Ia288851a05b4e339679db268f3dd7924e7b65586
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7782
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Florian Klink 2023-01-06 18:52:44 +01:00 committed by clbot
parent 1ebda9e13e
commit 396fdde0c0

View file

@ -256,11 +256,8 @@ impl Derivation {
let digest = hasher.finalize_reset();
let abs_store_path = format!(
"{}/{}",
STORE_DIR,
build_store_path(false, &digest, &output_path_name)?
);
let abs_store_path =
build_store_path(false, &digest, &output_path_name)?.to_absolute_path();
output.path = abs_store_path.clone();
self.environment
@ -295,8 +292,7 @@ impl Derivation {
hasher.finalize()
};
let abs_store_path =
format!("{}/{}", STORE_DIR, build_store_path(false, &digest, name)?);
let abs_store_path = build_store_path(false, &digest, name)?.to_absolute_path();
self.outputs.insert(
"out".to_string(),