Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
Fix another case of yarn naming scheme in setup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
onpaws authored and milesrichardson committed Mar 16, 2021
1 parent f5b47f6 commit 46f8dfd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,18 @@ ensure_yarn() {
fi

# Account for releases with naming scheme yarn-2*.(js|cjs)
if test ls "$SPLITGRAPH_DIR"/.yarn/releases/yarn-2.6* 2>/dev/null ; then
if test ls "$SPLITGRAPH_DIR"/.yarn/releases/yarn-2* 2>/dev/null ; then
mv "$SPLITGRAPH_DIR"/.yarn/releases/yarn-2* \
"$SPLITGRAPH_DIR"/.yarn/releases/yarn-berry.js \
&& sed -Ei 's/yarn-[0-9+\.]+\.(cjs|js)/yarn-berry.js/' "$SPLITGRAPH_DIR"/.yarnrc.yml
fi

# Account for releases with naming scheme yarn-berry.cjs
if test -f "$SPLITGRAPH_DIR"/.yarn/releases/yarn-berry.cjs ; then
mv "$SPLITGRAPH_DIR"/.yarn/releases/yarn-berry.cjs \
"$SPLITGRAPH_DIR"/.yarn/releases/yarn-berry.js \
&& sed -i 's/yarn-berry\.cjs/yarn-berry\.js/' "$SPLITGRAPH_DIR"/.yarnrc.yml
fi
fi

if ! dir_has_yarn_plugins "$SPLITGRAPH_DIR" ; then
Expand Down

0 comments on commit 46f8dfd

Please sign in to comment.