0
0
Fork 0
forked from lix-project/lix

Check for epochs < 201906

This commit is contained in:
Eelco Dolstra 2019-07-10 10:27:33 +02:00
parent cc218b15ba
commit b0c220c02e
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -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