Skip to content

Commit

Permalink
refine script: Abort build early if NPM is missing (#6567)
Browse files Browse the repository at this point in the history
Closes #6566.
  • Loading branch information
wetneb committed May 10, 2024
1 parent 4ccd0ed commit db5fc77
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions refine
Expand Up @@ -207,6 +207,12 @@ build_prepare() {
if [ ! -d $REFINE_BUILD_DIR ] ; then
mkdir $REFINE_BUILD_DIR || error "Error while making directory $REFINE_BUILD_DIR"
fi
NPM_VERSION=`npm -v`
if [ $? -ne 0 ] ; then
error "NPM not found. We need it in the PATH to download frontend dependencies. See https://openrefine.org/docs/technical-reference/build-test-run#nodejs"
else
echo "Using NPM version $NPM_VERSION"
fi
( cd main/webapp && npm install )
}

Expand Down

0 comments on commit db5fc77

Please sign in to comment.