1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 14:21:48 +02:00

Store info command help updates

This commit is contained in:
vicky1999 2023-10-17 09:39:59 +05:30
parent 5c65379b22
commit dcc5f801f4
3 changed files with 11 additions and 11 deletions

View file

@ -1,7 +1,7 @@
source common.sh
STORE_INFO=$(nix store ping 2>&1)
STORE_INFO_JSON=$(nix store ping --json)
STORE_INFO=$(nix store info 2>&1)
STORE_INFO_JSON=$(nix store info --json)
echo "$STORE_INFO" | grep "Store URL: ${NIX_REMOTE}"
@ -11,7 +11,7 @@ if [[ -v NIX_DAEMON_PACKAGE ]] && isDaemonNewer "2.7.0pre20220126"; then
[[ "$(echo "$STORE_INFO_JSON" | jq -r ".version")" == "$DAEMON_VERSION" ]]
fi
expect 127 NIX_REMOTE=unix:$PWD/store nix store ping || \
fail "nix store ping on a non-existent store should fail"
expect 127 NIX_REMOTE=unix:$PWD/store nix store info || \
fail "nix store info on a non-existent store should fail"
[[ "$(echo "$STORE_INFO_JSON" | jq -r ".url")" == "${NIX_REMOTE:-local}" ]]