diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2019-07-10 10:27:33 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-07-10 10:27:33 +0200 |
commit | b0c220c02ec584af282b9c7f493e4a4d2e429f8c (patch) | |
tree | 9965194f84e7e27b9c673e3b4859215d43788b69 | |
parent | cc218b15bad7d1883ac951bc48a8285fcef78916 (diff) |
Check for epochs < 201906
-rw-r--r-- | src/libexpr/flake/flake.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc index 302549a3c..4f59c61bd 100644 --- a/src/libexpr/flake/flake.cc +++ b/src/libexpr/flake/flake.cc @@ -227,6 +227,8 @@ Flake getFlake(EvalState & state, const FlakeRef & flakeRef) if (auto epoch = vInfo.attrs->get(sEpoch)) { flake.epoch = state.forceInt(*(**epoch).value, *(**epoch).pos); + if (flake.epoch < 201906) + throw Error("flake '%s' has illegal epoch %d", flakeRef, flake.epoch); if (flake.epoch > 201906) throw Error("flake '%s' requires unsupported epoch %d; please upgrade Nix", flakeRef, flake.epoch); } else |