Skip to content

Commit

Permalink
🔧 fix: look at repo root
Browse files Browse the repository at this point in the history
  • Loading branch information
Rettend committed Jan 20, 2024
1 parent 8685ed8 commit f725e8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions bin/hook.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit f725e8b

Please sign in to comment.