diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-09-03 14:06:57 +0000 |
---|---|---|
committer | Kushal Pandya <kushalspandya@gmail.com> | 2019-09-03 14:06:57 +0000 |
commit | 015efb0f719d3b4a7bec82dec2d2f912985a6c0f (patch) | |
tree | 63ed24bc6aa39649d5e9f3b3693de5274fb6f19c | |
parent | bc26349b76ccde5dc0edba19ab48c6bd0d3f8adf (diff) | |
download | gitlab-ce-015efb0f719d3b4a7bec82dec2d2f912985a6c0f.tar.gz |
Improve output for yarn integrity check
-rw-r--r-- | package.json | 2 | ||||
-rwxr-xr-x | scripts/frontend/check_dependencies.sh | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/package.json b/package.json index 4244dc2d52b..782bb3a96a7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "scripts": { - "check-dependencies": "yarn check --integrity", + "check-dependencies": "scripts/frontend/check_dependencies.sh", "clean": "rm -rf public/assets tmp/cache/*-loader", "dev-server": "NODE_OPTIONS=\"--max-old-space-size=3584\" nodemon -w 'config/webpack.config.js' --exec 'webpack-dev-server --config config/webpack.config.js'", "eslint": "eslint --max-warnings 0 --report-unused-disable-directives --ext .js,.vue .", diff --git a/scripts/frontend/check_dependencies.sh b/scripts/frontend/check_dependencies.sh new file mode 100755 index 00000000000..64e7cf9da52 --- /dev/null +++ b/scripts/frontend/check_dependencies.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +if ! yarn check --integrity 2>&1 > /dev/null +then + echo + echo " $(tput setaf 1)yarn check --integrity$(tput sgr0) failed!" + echo " Your dependencies probably don't match the yarn.lock file." + echo " Please run $(tput setaf 2)yarn install$(tput sgr0) and try again." + echo + exit 1 +fi |