info store alias added to store-ping

This commit is contained in:
vicky1999 2023-10-13 07:16:05 +05:30
parent b4b1a07f97
commit 5c65379b22

View file

@ -46,5 +46,15 @@ struct CmdPingStore : StoreCommand, MixJSON
}
};
struct CmdInfoStore : CmdPingStore
{
void run(nix::ref<nix::Store> store) override
{
warn("'nix store info' is a deprecated alias for 'nix store ping'");
CmdPingStore::run(store);
}
};
static auto rCmdPingStore = registerCommand2<CmdPingStore>({"store", "ping"});
static auto rCmdInfoStore = registerCommand2<CmdPingStore>({"store", "info"});
static auto rCmdInfoStore = registerCommand2<CmdInfoStore>({"store", "info"});