nixos-version: print error for missing revision to stderr

This commit is contained in:
Michael Lohmann 2023-01-03 20:16:50 +01:00
parent c09f6c3db0
commit 3b5456608a

View file

@ -8,7 +8,7 @@ case "$1" in
;; ;;
--hash|--revision) --hash|--revision)
if ! [[ @revision@ =~ ^[0-9a-f]+$ ]]; then if ! [[ @revision@ =~ ^[0-9a-f]+$ ]]; then
echo "$0: Nixpkgs commit hash is unknown" echo "$0: Nixpkgs commit hash is unknown" >&2
exit 1 exit 1
fi fi
echo "@revision@" echo "@revision@"