From 14220c82ac722e6f0a392e32c3cdce36916bf22e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Thu, 31 Jul 2025 10:00:26 +0200 Subject: [PATCH] pnpm: exclude prereleases from update script --- pkgs/development/tools/pnpm/generic.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/pnpm/generic.nix b/pkgs/development/tools/pnpm/generic.nix index 54f463b1990b..626849d7b680 100644 --- a/pkgs/development/tools/pnpm/generic.nix +++ b/pkgs/development/tools/pnpm/generic.nix @@ -91,7 +91,11 @@ stdenvNoCC.mkDerivation (finalAttrs: { curl -L ''${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "$@" } - latestTag=$(curl_github https://api.github.com/repos/pnpm/pnpm/releases?per_page=100 | jq -r --arg major "v${majorVersion}" '[.[].tag_name | select(startswith($major))][0]') + latestTag=$( + curl_github https://api.github.com/repos/pnpm/pnpm/releases?per_page=100 | \ + jq -r --arg major "v${majorVersion}" \ + '[.[] | select(.tag_name | startswith($major)) | select(.prerelease == false)][0].tag_name' + ) # Exit if there is no tag with this major version if [ "$latestTag" = "null" ]; then