1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 13:41:15 +02:00

Merge pull request #3380 from contrun/no-attr-path-for-installed

display attr-path only when queried available
This commit is contained in:
Eelco Dolstra 2020-03-13 19:26:20 +01:00 committed by GitHub
commit 779ef8f5ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -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;