Skip to content

Commit

Permalink
fix(ci): hacky solution to macos not having realpath cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjydev committed Dec 1, 2023
1 parent 2735281 commit 0bd3072
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions hack/test-darwin.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/usr/bin/env zsh

# Hacky solution to macos not having a `realpath` command
realpath() {
path=`eval echo "$1"`
folder=$(dirname "$path")
echo $(cd "$folder"; pwd)/$(basename "$path");
}

# Get the relative path of the script -> the script's dir -> the dir's parent
# (i.e. the repo root) and convert it to an absolute path
root="$(realpath $(dirname $(dirname ${BASH_SOURCE[0]})))"
Expand Down

0 comments on commit 0bd3072

Please sign in to comment.