mirror of
https://github.com/Installomator/Installomator.git
synced 2026-03-07 11:12:03 +00:00
Broken app label: sketch #22
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 @Aghabozorgi on GitHub.
Can not install sketch, exit code 2
Script result: 2025-10-10 07:33:41 : REQ : : shifting arguments for Jamf
2025-10-10 07:33:41 : INFO : sketch : setting variable from argument NOTIFY=success
2025-10-10 07:33:41 : INFO : sketch : setting variable from argument DEBUG=0
2025-10-10 07:33:41 : INFO : sketch : Total items in argumentsArray: 2
2025-10-10 07:33:41 : INFO : sketch : argumentsArray: NOTIFY=success DEBUG=0
2025-10-10 07:33:41 : REQ : sketch : ################## Start Installomator v. 10.9beta, date 2025-09-24
2025-10-10 07:33:41 : INFO : sketch : ################## Version: 10.9beta
2025-10-10 07:33:41 : INFO : sketch : ################## Date: 2025-09-24
2025-10-10 07:33:41 : INFO : sketch : ################## sketch
2025-10-10 07:33:42 : INFO : sketch : Reading arguments again: NOTIFY=success DEBUG=0
2025-10-10 07:33:42 : INFO : sketch : BLOCKING_PROCESS_ACTION=tell_user
2025-10-10 07:33:42 : INFO : sketch : NOTIFY=success
2025-10-10 07:33:42 : INFO : sketch : LOGGING=INFO
2025-10-10 07:33:42 : INFO : sketch : LOGO=/System/Applications/App Store.app/Contents/Resources/AppIcon.icns
2025-10-10 07:33:42 : INFO : sketch : Label type: zip
2025-10-10 07:33:42 : INFO : sketch : archiveName: Sketch.zip
2025-10-10 07:33:42 : INFO : sketch : no blocking processes defined, using Sketch as default
2025-10-10 07:33:42 : INFO : sketch : name: Sketch, appName: Sketch.app
2025-10-10 07:33:42 : WARN : sketch : No previous app found
2025-10-10 07:33:42 : WARN : sketch : could not find Sketch.app
2025-10-10 07:33:42 : INFO : sketch : appversion:
2025-10-10 07:33:42 : INFO : sketch : Latest version of Sketch is 2025.2
2025-10-10 07:33:42 : INFO : sketch : 2025.2
2025-10-10 07:33:43 : REQ : sketch : Downloading https://download.sketch.com/sketch-2025.2.3-205383.zip
2025-10-10 07:33:43 : REQ : sketch : https://download.sketch.com/sketch-2025.2.3-205383.zip to Sketch.zip
shasum: Sketch.zip: No such file or directory
du: Sketch.zip: No such file or directory
2025-10-10 07:33:43 : INFO : sketch : Downloaded Sketch.zip – Type is cannot open `Sketch.zip' (No such file or directory) – SHA is – Size is kB
2025-10-10 07:33:43 : ERROR : sketch : error downloading https://download.sketch.com/sketch-2025.2.3-205383.zip
2025-10-10 07:33:43 : ERROR : sketch : https://download.sketch.com/sketch-2025.2.3-205383.zip
2025-10-10 07:33:43 : INFO : sketch : Installomator did not close any apps, so no need to reopen any apps.
2025-10-10 07:33:43 : ERROR : sketch : ERROR: Error downloading https://download.sketch.com/sketch-2025.2.3-205383.zip
2025-10-10 07:33:43 : ERROR : sketch : https://download.sketch.com/sketch-2025.2.3-205383.zip error:
curl: (3) URL rejected: Malformed input to a URL function
2025-10-10 07:33:43 : REQ : sketch : ################## End Installomator, exit code 2
Have you confirmed this Issue has not been reported already? (Check open Issues and Pull requests)
yes, old issue was closed, but the solution did not work for me.
Installomator v. 10.9beta, date 2025-09-24
downloadURL=$(curl -sf https://www.sketch.com/downloads/mac/ | grep ‘href=“https://download.sketch.com’ | tr ‘”’ “\n” | grep -E “https.*.zip”) produces the following output:
https://download.sketch.com/sketch-2025.2.3-205383.zip
https://download.sketch.com/sketch-2025.2.3-205383.zip
I was able to fix it as follows:
downloadURL=$(curl -sf https://www.sketch.com/downloads/mac/ | grep ‘href=“https://download.sketch.com’ | tr ‘”’ “\n” | grep -E “https.*.zip” | head -n 1)
@uurazzle commented on GitHub:
Hi @Aghabozorgi:
FYI, the new label improves reliability by adding the -L flag to follow redirects, using more precise regex patterns with grep -o and head -1 to ensure only one URL is captured (preventing duplicate matches), and simplifying the download URL extraction by removing the unnecessary tr command. The version detection is enhanced by parsing the filename directly from the website rather than relying on the downloadURL variable, making it independent and more robust. The sed-based version extraction also properly strips the build number suffix (e.g., extracting 2025.3.2 from sketch-2025.3.2-221149.zip) instead of the simpler awk approach that could fail with different filename formats.
Here is the pull request: https://github.com/Installomator/Installomator/pull/2713