mirror of
https://github.com/NixOS/nix
synced 2025-06-27 12:41:15 +02:00
Merge pull request #12583 from ulucs/ulucs/skip-ifds
`nix flake show`: Skip IFDs instead of throwing
This commit is contained in:
commit
ca165f09c0
6 changed files with 69 additions and 15 deletions
|
@ -110,5 +110,6 @@ template class EvalErrorBuilder<UndefinedVarError>;
|
|||
template class EvalErrorBuilder<MissingArgumentError>;
|
||||
template class EvalErrorBuilder<InfiniteRecursionError>;
|
||||
template class EvalErrorBuilder<InvalidPathError>;
|
||||
template class EvalErrorBuilder<IFDError>;
|
||||
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ MakeError(TypeError, EvalError);
|
|||
MakeError(UndefinedVarError, EvalError);
|
||||
MakeError(MissingArgumentError, EvalError);
|
||||
MakeError(InfiniteRecursionError, EvalError);
|
||||
MakeError(IFDError, EvalBaseError);
|
||||
|
||||
struct InvalidPathError : public EvalError
|
||||
{
|
||||
|
|
|
@ -91,7 +91,7 @@ StringMap EvalState::realiseContext(const NixStringContext & context, StorePathS
|
|||
if (drvs.empty()) return {};
|
||||
|
||||
if (isIFD && !settings.enableImportFromDerivation)
|
||||
error<EvalBaseError>(
|
||||
error<IFDError>(
|
||||
"cannot build '%1%' during evaluation because the option 'allow-import-from-derivation' is disabled",
|
||||
drvs.begin()->to_string(*store)
|
||||
).debugThrow();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue