Skip to content

Commit fb53c45

Browse files
authored
fix: use absolute path in latest-stable callback when calling list-all (#144)
Use absolute path in latest-stable when calling list-all
1 parent 7c963fe commit fb53c45

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/latest-stable

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
#!/usr/bin/env bash
22

3+
# get the directory of the current script
4+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
5+
36
# calling a script to list all elixir releases
47
# reject releases before 1.0.0 (starting with 0)
58
# reject main and master branches
69
# reject releases with otp version
710
# reject release candidates
811
# reject empty line
912
# finally take last one
10-
ASDF_ELIXIR_LATEST_VERSION=$(./list-all | tr " " "\n" | grep -Ev "^0|^main|^master|otp|rc|^$" | tail -n 1)
13+
ASDF_ELIXIR_LATEST_VERSION=$("$SCRIPT_DIR"/list-all | tr " " "\n" | grep -Ev "^0|^main|^master|otp|rc|^$" | tail -n 1)
1114

1215
# gets current erlang version without headers
1316
# changes spaces to new line

0 commit comments

Comments
 (0)