path_info: check for and resolve symlink

This commit is contained in:
cy 2025-05-04 01:48:13 -04:00
parent 0e97d11745
commit 14d6e9d29e
3 changed files with 33 additions and 4 deletions

View file

@ -28,6 +28,14 @@ impl PathInfo {
let derivation = match drv.extension() {
Some(ext) if ext == "drv" => drv.as_os_str().as_encoded_bytes(),
_ => {
let drv = {
// resolve symlink
if drv.is_symlink() {
&drv.canonicalize()?
} else {
drv
}
};
&Command::new("nix")
.arg("path-info")
.arg("--derivation")