Skip to content

Commit fa2ea40

Browse files
committed
Improve error message in update.sh when updater is corrupt.
1 parent 80bd5ed commit fa2ea40

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmd/updater/update.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,12 @@ function check_for_update() {
245245
return 1
246246
fi
247247
248-
echo Latest Version = ${LATEST}
248+
if [ -z ${LATEST} ]; then
249+
echo "Failed to lookup latest release. This could happen if the 'updater' binary is corrupted."
250+
return 1
251+
fi
252+
253+
echo "Latest Version = ${LATEST}"
249254
250255
if [ ${CURRENTVER} -ge ${LATEST} ]; then
251256
if [ "${UPDATETYPE}" = "install" ]; then

0 commit comments

Comments
 (0)