Skip to content

Commit

Permalink
give warning message instead and do it till install cmd is run
Browse files Browse the repository at this point in the history
  • Loading branch information
OnkarRuikar committed Feb 7, 2024
1 parent 094e5bc commit 061ee75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .husky/post-merge
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ if [ -f ".husky/_/history" ]; then
lastHash=$(cat ./.husky/_/history)
isUpdated=$(git diff $lastHash HEAD -- ./package.json)
if [ "$isUpdated" != "" ]; then
yarn install
echo ⚠🔥 package.json has been modified please run 'yarn install'! 🔥
fi
else
yarn install
fi

echo $(git rev-parse HEAD) > ./.husky/_/history
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
},
"type": "module",
"scripts": {
"postinstall": "sh ./.husky/update-history",
"build": "env-cmd --silent cross-env CONTENT_ROOT=files BUILD_OUT_ROOT=build yari-build",
"content": "env-cmd --silent cross-env CONTENT_ROOT=files yari-tool",
"filecheck": "env-cmd --silent cross-env CONTENT_ROOT=files yari-filecheck --cwd=.",
Expand Down

0 comments on commit 061ee75

Please sign in to comment.