diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index 601de0f3..5ffceb81 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -43,11 +43,12 @@ jobs: - name: Build is up-to-date run: | echo -e "\e[1m\e[35mChecking the build folder(dist) is up-to-date with the library\e[0m" - changed_build_files=$(git -C "$(git rev-parse --show-toplevel)" diff --name-only HEAD -- ${{ matrix.package }}/dist) + changed_build_files=$(git diff --name-only HEAD -- ${{ matrix.package }}/dist) if [ -n "$changed_build_files" ] then echo -e "\e[1m\e[31mBuild folder is out-of-sync with library. Build library, npm run build, and (ammend) commit\e[0m" echo -e "\e[1m\e[31mChanged files: $changed_build_files" + git diff HEAD -- ${{ matrix.package }}/dist exit 1 else echo -e "\e[1m\e[32mBuild folder is up-to-date with library\e[0m"