mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
Make NIX_SHOW_STATS work with new-style commands
This commit is contained in:
parent
e64cf8e0a3
commit
7331da99ab
2 changed files with 8 additions and 0 deletions
|
@ -48,6 +48,8 @@ struct EvalCommand : virtual StoreCommand, MixEvalArgs
|
|||
ref<EvalState> getEvalState();
|
||||
|
||||
std::shared_ptr<EvalState> evalState;
|
||||
|
||||
~EvalCommand();
|
||||
};
|
||||
|
||||
struct MixFlakeOptions : virtual Args, EvalCommand
|
||||
|
|
|
@ -280,6 +280,12 @@ ref<EvalState> EvalCommand::getEvalState()
|
|||
return ref<EvalState>(evalState);
|
||||
}
|
||||
|
||||
EvalCommand::~EvalCommand()
|
||||
{
|
||||
if (evalState)
|
||||
evalState->printStats();
|
||||
}
|
||||
|
||||
void completeFlakeRef(ref<Store> store, std::string_view prefix)
|
||||
{
|
||||
if (prefix == "")
|
||||
|
|
Loading…
Reference in a new issue