mirror of
https://github.com/Installomator/Installomator.git
synced 2026-02-23 14:29:27 +00:00
Error downloading Nudge - GitHub API not returning URL #345
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Drakeii on GitHub.
Hi,
First off, thanks a lot for the great development on this repository.
One of our JAMF managed MacBooks is running into an error when checking for a new Nudge version using Installomator.
According to JAMF logs, all other devices in the same group are succeeding with the installation/update the same date, except for one.
I am adding the log below, but a few comments from my side:
This is handled by versionFromGit():528:installomator.sh
If I run this manually I do in fact get a version number, not an empty string.
(curl -sLI "https://github.com/macadmins/nudge/releases/latest" | grep -i "^location" | tr "/" "\n" | tail -1 | sed 's/[^0-9\.]//g')Same for the acquisition of the latest release URL, the logs below show no error retrieving it, but it seems in the end somehow the variable content is wrong.
This is handled by downloadURLFromGit():495:installomator.sh
If I run one part manually, I do in fact get a valid URL: https://github.com/macadmins/nudge/releases/download/v1.1.11.81465/Nudge-1.1.11.81465.pkg
(curl -sfL "https://api.github.com/repos/macadmins/nudge/releases/latest" | awk -F '"' "/browser_download_url/ && /Nudge-[0-9.]*.pkg\"/ { print \$4 }")Furthermore, it looks like some error string is injected into the variable $downloadURL:
Line 7818:installomator.sh
printlog "error downloading $downloadURL" ERRORLine 7830:installomator.sh
cleanupAndExit 2 "Error downloading $downloadURL error:\n$logoutput" ERRORBy respecting this structure, the log above shows that $downloadURL contains the error about "GitHub API", instead of the URL
All the other errors following are related to this part I assume.
What could lead to the error "GitHub API not returning URL"? This is not logged from installomator.sh directly, so I did not follow up much more.