Skip to content

Commit

Permalink
chore: Improved messaging when yarn is not present. (aws#4899)
Browse files Browse the repository at this point in the history
Currently, the message generated is 'lerna ERR! yarn run build exited 2'
which is not very helpful.
  • Loading branch information
nija-at authored and mergify[bot] committed Nov 8, 2019
1 parent 87421c9 commit 0cd6780
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ rm -rf $BUILD_INDICATOR
export MERKLE_BUILD_CACHE=$(mktemp -d)
trap "rm -rf $MERKLE_BUILD_CACHE" EXIT

if ! [ -x "$(command -v yarn)" ]; then
echo "yarn is not installed. Install it from here- https://yarnpkg.com/en/docs/install."
exit 1
fi

echo "============================================================================================="
echo "building..."
time lerna run $bail --stream $runtarget || fail
Expand Down
5 changes: 5 additions & 0 deletions scripts/builddown
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/bash
set -euo pipefail

if ! [ -x "$(command -v yarn)" ]; then
echo "yarn is not installed. Follow the guide to install yarn - https://yarnpkg.com/en/docs/install."
exit 1
fi

export NODE_OPTIONS="--max-old-space-size=4096 ${NODE_OPTIONS:-}"

scriptdir=$(cd $(dirname $0) && pwd)
Expand Down
5 changes: 5 additions & 0 deletions scripts/buildup
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/bash
set -euo pipefail

if ! [ -x "$(command -v yarn)" ]; then
echo "yarn is not installed. Install it from here- https://yarnpkg.com/en/docs/install."
exit 1
fi

export NODE_OPTIONS="--max-old-space-size=4096 ${NODE_OPTIONS:-}"

scriptdir=$(cd $(dirname $0) && pwd)
Expand Down

0 comments on commit 0cd6780

Please sign in to comment.