mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
nix flake show: name attribute that must be a derivation
I would run `nix flake show` on a flake than hit: === ├───ihaskell: package 'ihaskell-wrapper' ├───ihaskell-96: package 'ihaskell-wrapper' ├───ihaskell-96-dev: package 'ghc-shell-for-ihaskell-0.10.4.0' error: expected a derivation === and it is not obvious what package is the culprit here since nix stops rightaway.
This commit is contained in:
parent
89ba6dff66
commit
52b7357a1b
1 changed files with 4 additions and 2 deletions
|
@ -1332,8 +1332,10 @@ struct CmdFlakeShow : FlakeCommand, MixJSON
|
|||
try {
|
||||
if (visitor.isDerivation())
|
||||
showDerivation();
|
||||
else
|
||||
throw Error("expected a derivation");
|
||||
else {
|
||||
auto name = visitor.getAttrPathStr(state->sName);
|
||||
logger->warn(fmt("%s must be a derivation", name));
|
||||
}
|
||||
} catch (IFDError & e) {
|
||||
if (!json) {
|
||||
logger->cout(fmt("%s " ANSI_WARNING "omitted due to use of import from derivation" ANSI_NORMAL, headerPrefix));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue