Skip to content

Commit a338c03

Browse files
authored
install.sh: fix broken wget in install script (#842)
1 parent ee33e8a commit a338c03

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

install.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,16 @@ set -u # error on use of undefined variable
6868
FETCH=$(get_fetch_command)
6969
if [ $? -ne 0 ]; then
7070
echo "No download mechanism found. Install curl or wget first."
71-
exit 1
71+
exit 2
72+
fi
73+
74+
LATEST_RELEASE=$(get_latest_release "fortran-lang/fpm" "$FETCH")
75+
76+
if [ -z "$LATEST_RELEASE" ]; then
77+
echo "Could not fetch the latest release from GitHub. Install curl or wget, and ensure network connectivity."
78+
exit 3
7279
fi
7380

74-
LATEST_RELEASE=$(get_latest_release "fortran-lang/fpm" $FETCH)
7581
SOURCE_URL="https://github.com/fortran-lang/fpm/releases/download/v${LATEST_RELEASE}/fpm-${LATEST_RELEASE}.F90"
7682
BOOTSTRAP_DIR="build/bootstrap"
7783

0 commit comments

Comments
 (0)