Skip to content

Commit aae39f1

Browse files
authored
re-download Earthly on failure to execute (#1108)
1 parent 0cc52c1 commit aae39f1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.evergreen/earthly.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ if [[ "$OS_NAME" == "macos" ]]; then
3232
fi
3333
exe_path="$cache_dir/$exe_filename"
3434

35+
if test -f "$exe_path" && ! "$exe_path" --version; then
36+
echo "Failed to execute Earthly executable, removing and re-downloading"
37+
rm "$exe_path"
38+
fi
39+
3540
# Download if it isn't already present
3641
if ! test -f "$exe_path"; then
3742
echo "Downloading $exe_filename $EARTHLY_VERSION"

0 commit comments

Comments
 (0)