Skip to content

Commit

Permalink
only run on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
jbudz committed Oct 21, 2024
1 parent 52705f1 commit f5c168c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .buildkite/scripts/common/setup_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,13 @@ if [[ ! $(which yarn) || $(yarn --version) != "$YARN_VERSION" ]]; then
npm_install_global yarn "^$YARN_VERSION"
fi

grep -q 'yarn-offline-mirror ".yarn-local-mirror"' .yarnrc
sed -i "s#.yarn-local-mirror#$YARN_OFFLINE_CACHE#" .yarnrc
# The default offline mirror is at $KIBANA_DIR/.yarn-local-mirror via .yarnrc
# On Linux, packer_cache.sh runs on a temporary Kibana checkout
# and the mirror needs to be preserved outside of that folder
if [[ "$OS" == "linux" ]]; then
grep -q 'yarn-offline-mirror ".yarn-local-mirror"' .yarnrc
sed -i "s#.yarn-local-mirror#$YARN_OFFLINE_CACHE#" .yarnrc
fi

YARN_GLOBAL_BIN=$(yarn global bin)
export YARN_GLOBAL_BIN
Expand Down

0 comments on commit f5c168c

Please sign in to comment.