path_info: check for and resolve symlink
This commit is contained in:
parent
0e97d11745
commit
14d6e9d29e
3 changed files with 33 additions and 4 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue