mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
Merge pull request #10666 from tie/derivation-outputs-drv-path
Forbid drvPath in strictDerivation outputs attribute
This commit is contained in:
commit
c940d11fb0
2 changed files with 145 additions and 65 deletions
|
@ -1184,11 +1184,11 @@ static void derivationStrictInternal(
|
|||
.debugThrow();
|
||||
/* !!! Check whether j is a valid attribute
|
||||
name. */
|
||||
/* Derivations cannot be named ‘drv’, because
|
||||
then we'd have an attribute ‘drvPath’ in
|
||||
the resulting set. */
|
||||
if (j == "drv")
|
||||
state.error<EvalError>("invalid derivation output name 'drv'")
|
||||
/* Derivations cannot be named ‘drvPath’, because
|
||||
we already have an attribute ‘drvPath’ in
|
||||
the resulting set (see state.sDrvPath). */
|
||||
if (j == "drvPath")
|
||||
state.error<EvalError>("invalid derivation output name 'drvPath'")
|
||||
.atPos(v)
|
||||
.debugThrow();
|
||||
outputs.insert(j);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue