-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle failed resolution of version sha
- Loading branch information
Showing
2 changed files
with
7 additions
and
2 deletions.
There are no files selected for viewing
7 changes: 6 additions & 1 deletion
7
src/GitS-Core.package/GSSelfUpdater.class/class/getShaOfVersion..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
requests | ||
getShaOfVersion: aString | ||
^ (WebClient httpGet: (self githubApiUrlForVersion: aString)) content parseAsJson at: 'sha' | ||
| response | | ||
response := (WebClient httpGet: (self githubApiUrlForVersion: aString)) content parseAsJson. | ||
(response at: 'status') asInteger = 200 ifFalse: [ | ||
^ self error: ('Error while trying to resolve git-s version {1}: {2}' | ||
format: {aString printString. response at: 'message'})]. | ||
^ response at: 'sha' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters