Skip to content

Commit 87f51db

Browse files
committed
Merge pull request #52 from chrismcg/HashNuke-hex-path-patch-fix
More hex path patch fix
2 parents a55cc71 + 7d92b6e commit 87f51db

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/app_funcs.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,20 @@ function copy_hex() {
1515
mkdir -p ${build_path}/.mix/archives
1616
mkdir -p ${build_path}/.hex
1717

18-
if [ -z "$hex_source" ]; then
18+
if [ -n "$hex_source" ]; then
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)