mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
display attr-path only when queried available
This commit is contained in:
parent
22a754c091
commit
b6d794fb8d
2 changed files with 4 additions and 1 deletions
|
@ -914,6 +914,8 @@ static void opQuery(Globals & globals, Strings opFlags, Strings opArgs)
|
|||
throw UsageError(format("unknown flag '%1%'") % arg);
|
||||
}
|
||||
|
||||
if (printAttrPath && source != sAvailable)
|
||||
throw UsageError("--attr-path(-P) only works with --available");
|
||||
|
||||
/* Obtain derivation information from the specified source. */
|
||||
DrvInfos availElems, installedElems;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue