diff --git a/.husky/post-merge b/.husky/post-merge index 78cf5a81e57..7ff64bebced 100755 --- a/.husky/post-merge +++ b/.husky/post-merge @@ -1,4 +1,10 @@ -#!/bin/sh +#!/usr/bin/env bash . "$(dirname "$0")/_/husky.sh" -pnpm install --frozen-lockfile +changedManifests=$( ( git diff --name-only HEAD ORIG_HEAD | grep -E '(package.json|pnpm-lock.yaml|pnpm-workspace.yaml|composer.json|composer.lock)$' ) || echo '' ) +if [ -n "$changedManifests" ]; then + printf "It was a change in the following file(s) - refreshing dependencies:\n" + printf " %s\n" $changedManifests + + pnpm install --frozen-lockfile +fi