Skip to content

Commit

Permalink
fix: yarn install fails when release is tagged in GitHub but not yet …
Browse files Browse the repository at this point in the history
…published on yarnpkg.com (#141)
  • Loading branch information
eszjay authored Mar 30, 2022
1 parent b6951b9 commit 41faea4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/scripts/install-yarn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ if [[ $EUID == 0 ]]; then export SUDO=""; else export SUDO="sudo"; fi
# FUNCTIONS
get_yarn_version () {
if [[ "$NODE_PARAM_YARN_VERSION" == "" ]]; then
YARN_ORB_VERSION=$(curl -Ls -o /dev/null -w "%{url_effective}" \
"https://github.com/yarnpkg/yarn/releases/latest" | sed 's:.*/::' | cut -d 'v' -f 2 | cut -d 'v' -f 2)
YARN_ORB_VERSION=$(curl -s https://cdn.jsdelivr.net/npm/yarn/package.json | sed -n 's/.*version": "\(.*\)".*/\1/p')
echo "Latest version of Yarn is $YARN_ORB_VERSION"
else
YARN_ORB_VERSION="$NODE_PARAM_YARN_VERSION"
Expand Down

0 comments on commit 41faea4

Please sign in to comment.