Skip to content

Commit 7d92b6e

Browse files
committed
Ensure full_hex_file_path is always right
1 parent 4badee9 commit 7d92b6e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/app_funcs.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@ function copy_hex() {
1919
hex_file=`basename ${hex_source}`
2020
else
2121
# hex file names after elixir-1.1 in the hex-<version>.ez form
22-
hex_file=$(ls -t ${HOME}/.mix/archives/hex-*.ez | head -n 1)
22+
full_hex_file_path=$(ls -t ${HOME}/.mix/archives/hex-*.ez | head -n 1)
2323

2424
# For older versions of hex which have no version name in file
25-
if [ -z "$hex_file" ]; then
26-
hex_file="hex.ez"
25+
if [ -z "$full_hex_file_path" ]; then
26+
full_hex_file_path=${HOME}/.mix/archives/hex.ez
2727
fi
2828
fi
2929

3030
cp ${HOME}/.hex/registry.ets ${build_path}/.hex/
3131

32-
full_hex_file_path=${HOME}/.mix/archives/${hex_file}
3332
output_section "Copying hex from $full_hex_file_path"
3433
cp $full_hex_file_path ${build_path}/.mix/archives
3534
}

0 commit comments

Comments
 (0)