Clean up the lock file handling flags

Added a flag --no-update-lock-file to barf if the lock file needs any
changes. This is useful for CI systems if you're building a
checkout. Fixes #2947.

Renamed --no-save-lock-file to --no-write-lock-file. It is now a fatal
error if the lock file needs changes but --no-write-lock-file is not
given.
This commit is contained in:
Eelco Dolstra
2020-01-29 21:04:28 +01:00
parent f68bed7f67
commit 26f895a26d
7 changed files with 78 additions and 75 deletions
-10
View File
@@ -16,10 +16,6 @@ class EvalState;
struct Pos;
class Store;
namespace flake {
enum LockFileMode : unsigned int;
}
/* A command that requires a Nix store. */
struct StoreCommand : virtual Command
{
@@ -42,15 +38,9 @@ struct EvalCommand : virtual StoreCommand, MixEvalArgs
struct MixFlakeOptions : virtual Args
{
bool recreateLockFile = false;
bool saveLockFile = true;
bool useRegistries = true;
flake::LockFlags lockFlags;
MixFlakeOptions();
flake::LockFileMode getLockFileMode();
};
struct SourceExprCommand : virtual Args, EvalCommand, MixFlakeOptions