tests/functional2/nix: only convert path to physical if it isn't already
Change-Id: I88e5079ef01872302aade365444d9b028088ff95
This commit is contained in:
committed by
eldritch horrors
parent
042a147aff
commit
8f474399f5
@@ -269,7 +269,11 @@ class Nix:
|
||||
:param path: a string or Path to convert
|
||||
:return: a Path object holding the rewritten, physical system path to the store entry
|
||||
"""
|
||||
return Path(str(path).replace("/nix/store", self.store_dir.as_posix()))
|
||||
return (
|
||||
Path(str(path).replace("/nix/store", self.store_dir.as_posix()))
|
||||
if str(path).startswith("/nix/store")
|
||||
else Path(path)
|
||||
)
|
||||
|
||||
def hash_path(self, store_path: str | Path, *args: str) -> str:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user