mirror of
https://github.com/NixOS/nix.git
synced 2025-11-27 20:51:00 +01:00
Gate experimental features in DerivationOutput::fromJSON
This is an entry point for outside data, so we need to check enabled
experimental features here.
(cherry picked from commit aa74c7b0bc)
This commit is contained in:
parent
80afafdbd4
commit
bef52e525d
5 changed files with 54 additions and 11 deletions
|
|
@ -16,6 +16,9 @@ drvPath3=$(nix derivation add --dry-run < $TEST_HOME/foo.json)
|
|||
# With --dry-run nothing is actually written
|
||||
[[ ! -e "$drvPath3" ]]
|
||||
|
||||
# But the JSON is rejected without the experimental feature
|
||||
expectStderr 1 nix derivation add < $TEST_HOME/foo.json --experimental-features nix-command | grepQuiet "experimental Nix feature 'ca-derivations' is disabled"
|
||||
|
||||
# Without --dry-run it is actually written
|
||||
drvPath4=$(nix derivation add < $TEST_HOME/foo.json)
|
||||
[[ "$drvPath4" = "$drvPath3" ]]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue