1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-08 02:43:54 +02:00

Merge pull request #9150 from vicky1999/fix/8914

`nix store ping` -> `nix store info`
This commit is contained in:
John Ericson 2023-10-17 22:52:28 -04:00 committed by GitHub
commit 9d1f42db52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 35 additions and 24 deletions

View file

@ -17,7 +17,7 @@ struct CmdPingStore : StoreCommand, MixJSON
std::string doc() override
{
return
#include "ping-store.md"
#include "store-info.md"
;
}
@ -46,4 +46,15 @@ struct CmdPingStore : StoreCommand, MixJSON
}
};
static auto rCmdPingStore = registerCommand2<CmdPingStore>({"store", "ping"});
struct CmdInfoStore : CmdPingStore
{
void run(nix::ref<nix::Store> store) override
{
warn("'nix store ping' is a deprecated alias for 'nix store info'");
CmdPingStore::run(store);
}
};
static auto rCmdPingStore = registerCommand2<CmdPingStore>({"store", "info"});
static auto rCmdInfoStore = registerCommand2<CmdInfoStore>({"store", "ping"});

View file

@ -5,19 +5,19 @@ R""(
* Test whether connecting to a remote Nix store via SSH works:
```console
# nix store ping --store ssh://mac1
# nix store info --store ssh://mac1
```
* Test whether a URL is a valid binary cache:
```console
# nix store ping --store https://cache.nixos.org
# nix store info --store https://cache.nixos.org
```
* Test whether the Nix daemon is up and running:
```console
# nix store ping --store daemon
# nix store info --store daemon
```
# Description