From 4a52888273610134db63c208ed9ea66e58f55585 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Wed, 4 Oct 2023 15:39:04 -0300 Subject: [PATCH] fix: Do not fail if npm package has not yet been deployed (#2690) The check for the current version was failing if the package didn't exist, so the first deployment a package would always fail. We're now hitting this with the pxe. --- yarn-project/deploy_npm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn-project/deploy_npm.sh b/yarn-project/deploy_npm.sh index e3942117078..4f6ed2860bd 100755 --- a/yarn-project/deploy_npm.sh +++ b/yarn-project/deploy_npm.sh @@ -21,7 +21,7 @@ function deploy_package() { TAG_ARG="--tag $TAG" fi - PUBLISHED_VERSION=$(npm show . version ${TAG_ARG:-} 2> /dev/null) + PUBLISHED_VERSION=$(npm show . version ${TAG_ARG:-} 2> /dev/null) || true HIGHER_VERSION=$(npx semver ${VERSION} ${PUBLISHED_VERSION} | tail -1) # If there is already a published package equal to given version, assume this is a re-run of a deploy, and early out.