From 3b0c2be74fa8e6f1529422743318e6cfc0a833a7 Mon Sep 17 00:00:00 2001 From: Josh <37798644+joshuaellis@users.noreply.github.com> Date: Fri, 31 Mar 2023 08:35:13 +0100 Subject: [PATCH] chore: trim distTag Update scripts/remove-dist-tag.sh Co-Authored-By: Ben Irvin --- scripts/remove-dist-tag.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/remove-dist-tag.sh b/scripts/remove-dist-tag.sh index 7e76634cb1..eea0ce25e2 100755 --- a/scripts/remove-dist-tag.sh +++ b/scripts/remove-dist-tag.sh @@ -7,6 +7,9 @@ set -e distTag=$DIST_TAG +# trim distTag for whitespace at the start and end +distTag=$(echo "$distTag" | xargs) + if [[ -z "$distTag" ]]; then echo "Please enter the dist-tag you want to remove" read -r distTag @@ -19,4 +22,4 @@ if [[ "$distTag" == "latest" || "$distTag" == "beta" || "$distTag" == "alpha" || fi # Run npm dist-tag rm $distTag on each package -./node_modules/.bin/lerna exec --no-private --stream -- "npm dist-tag rm \$LERNA_PACKAGE_NAME $distTag" \ No newline at end of file +./node_modules/.bin/lerna exec --no-private --stream -- "npm dist-tag rm \$LERNA_PACKAGE_NAME $distTag"