Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions cmd/updater/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ function get_updater_url() {

# check to see if the binary updater exists. if not, it will automatically the correct updater binary for the current platform
function check_for_updater() {
# check if the updater binary exist.
if [ -f "${SCRIPTPATH}/updater" ]; then
# check if the updater binary exist and is not empty.
if [[ -s "${SCRIPTPATH}/updater" && -f "${SCRIPTPATH}/updater" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please check this line with shellcheck ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shellcheck doesn't have anything to say about this line

return 0
fi
get_updater_url
Expand Down Expand Up @@ -245,7 +245,12 @@ function check_for_update() {
return 1
fi

echo Latest Version = ${LATEST}
if [ -z ${LATEST} ]; then
echo "Failed to lookup latest release"
return 1
fi

echo "Latest Version = ${LATEST}"

if [ ${CURRENTVER} -ge ${LATEST} ]; then
if [ "${UPDATETYPE}" = "install" ]; then
Expand Down