Skip to content

Commit

Permalink
fix: Eof when installing using haxelib 4.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Jul 20, 2024
1 parent 98e7d44 commit 012ae01
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/actions/internal/install-haxelibs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ runs:
esac
echo "HAXELIB_PATH=$HAXELIB_PATH" | tee -a "$GITHUB_ENV"
haxelib config
haxelib_version=$(haxelib version)
echo "haxelib version: $haxelib_version"
(set -x; haxelib config)
haxelibs='${{ inputs.haxe-libs }}'
if [[ ${TEST_CPP:-} == "true" ]]; then
Expand Down Expand Up @@ -109,7 +111,11 @@ runs:
# in case it was already loaded from cache, delete it to prevent git errors like "You have divergent branches and need to specify how to reconcile them."
rm -rf "$HAXELIB_PATH/$lib_name/git"
(set -x; haxelib git --always "$lib_name" "${lib_ver_splitted[0]}" ${lib_ver_splitted[1]:-}) || exit $?
if [[ $haxelib_version == "4.0.2" ]]; then # workaround for "Uncaught exception - Failed with error: Eof"
(set -x; haxelib git --always "$lib_name" "${lib_ver_splitted[0]}" ${lib_ver_splitted[1]:-} || true)
else
(set -x; haxelib git --always "$lib_name" "${lib_ver_splitted[0]}" ${lib_ver_splitted[1]:-})
fi
continue;
fi
Expand All @@ -124,7 +130,11 @@ runs:
if [[ ! -f $HAXELIB_PATH/$lib_name/${lib_ver//./,}/haxelib.json ]]; then
(set -x; curl -sSfL --connect-timeout 10 --retry 3 "https://lib.haxe.org/p/$lib_name/$lib_ver/download/" -o "$lib_name.zip") || exit $?
(set -x; haxelib --always install "$lib_name.zip")
if [[ $haxelib_version == "4.0.2" ]]; then # workaround for "Uncaught exception - Failed with error: Eof"
(set -x; haxelib --debug --always install "$lib_name.zip" || true)
else
(set -x; haxelib --debug --always install "$lib_name.zip")
fi
rm "$lib_name.zip"
else
echo "Library $lib_name $lib_ver is already present."
Expand Down

0 comments on commit 012ae01

Please sign in to comment.