diff options
author | Erik Arvstedt <erik.arvstedt@gmail.com> | 2022-03-26 11:32:38 +0100 |
---|---|---|
committer | Erik Arvstedt <erik.arvstedt@gmail.com> | 2022-03-26 11:32:38 +0100 |
commit | 16860a0328094c04c3e877089119a56f9ddfbcd6 (patch) | |
tree | 1f3999b4263604737d27ed0b612ea2201d40696f /src/libcmd/command.hh | |
parent | 679b3b32c952eed3c3be6c450c8189948e5645cd (diff) |
nix eval: Add option `read-only`
Diffstat (limited to 'src/libcmd/command.hh')
-rw-r--r-- | src/libcmd/command.hh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libcmd/command.hh b/src/libcmd/command.hh index 0f6125f11..15bc13c6e 100644 --- a/src/libcmd/command.hh +++ b/src/libcmd/command.hh @@ -85,11 +85,12 @@ struct SourceExprCommand : virtual Args, MixFlakeOptions { std::optional<Path> file; std::optional<std::string> expr; + bool readOnlyMode = false; // FIXME: move this; not all commands (e.g. 'nix run') use it. OperateOn operateOn = OperateOn::Output; - SourceExprCommand(); + SourceExprCommand(bool supportReadOnlyMode = false); std::vector<std::shared_ptr<Installable>> parseInstallables( ref<Store> store, std::vector<std::string> ss); @@ -128,7 +129,7 @@ struct InstallableCommand : virtual Args, SourceExprCommand { std::shared_ptr<Installable> installable; - InstallableCommand(); + InstallableCommand(bool supportReadOnlyMode = false); void prepare() override; |