From f725e8b7ee384edbd356dcea176d25f0b4baa3cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hegyi=20=C3=81ron=20Ferenc?= Date: Sat, 20 Jan 2024 22:22:24 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix:=20look=20at=20repo=20root?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/e2e.yml | 10 +++++----- bin/hook.sh | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index d61f94e..aec83c1 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -43,12 +43,12 @@ jobs: - name: Setup eemoji run: node ./bin/eemoji.mjs init -c none - - name: Find .git/COMMIT_EDITMSG and print where it is - run: find . -name COMMIT_EDITMSG + - name: Ls whats in .git + run: ls -la .git + + - name: print npm path + run: npm root - - name: Find eemoji.mjs and print where it is - run: find . -name eemoji.mjs - - name: Switch to test branch run: git checkout -b test diff --git a/bin/hook.sh b/bin/hook.sh index d30e5cd..6296f47 100644 --- a/bin/hook.sh +++ b/bin/hook.sh @@ -1,14 +1,14 @@ #!/bin/sh LOCAL_PATH=$(npm root) NODE_PATH=$(npm root -g) -REPO_ROOT=$(git rev-parse --show-toplevel)/node_modules +REPO_ROOT=$(git rev-parse --show-toplevel) if [ -f "$LOCAL_PATH/eemoji/bin/eemoji.mjs" ]; then node "$LOCAL_PATH/eemoji/bin/eemoji.mjs" run $1 elif [ -f "$NODE_PATH/eemoji/bin/eemoji.mjs" ]; then node "$NODE_PATH/eemoji/bin/eemoji.mjs" run $1 -elif [ -f "$REPO_ROOT/eemoji/bin/eemoji.mjs" ]; then - node "$REPO_ROOT/eemoji/bin/eemoji.mjs" run $1 +elif [ -f "$REPO_ROOT/bin/eemoji.mjs" ]; then + node "$REPO_ROOT/bin/eemoji.mjs" run $1 else echo "eemoji is not properly installed locally or globally" exit 1