mirror of
https://github.com/NixOS/nix.git
synced 2024-11-26 08:42:30 +00:00
Merge pull request #3380 from contrun/no-attr-path-for-installed
display attr-path only when queried available
This commit is contained in:
commit
779ef8f5ef
@ -1066,7 +1066,8 @@ user environment elements, etc. -->
|
|||||||
the derivation, which can be used to unambiguously select it using
|
the derivation, which can be used to unambiguously select it using
|
||||||
the <link linkend="opt-attr"><option>--attr</option> option</link>
|
the <link linkend="opt-attr"><option>--attr</option> option</link>
|
||||||
available in commands that install derivations like
|
available in commands that install derivations like
|
||||||
<literal>nix-env --install</literal>.</para></listitem>
|
<literal>nix-env --install</literal>. This option only works
|
||||||
|
together with <option>--available</option></para></listitem>
|
||||||
|
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -914,6 +914,8 @@ static void opQuery(Globals & globals, Strings opFlags, Strings opArgs)
|
|||||||
throw UsageError(format("unknown flag '%1%'") % arg);
|
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. */
|
/* Obtain derivation information from the specified source. */
|
||||||
DrvInfos availElems, installedElems;
|
DrvInfos availElems, installedElems;
|
||||||
|
Loading…
Reference in New Issue
Block a user