-
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
8 additions
and
2 deletions.
There are no files selected for viewing
8 changes: 7 additions & 1 deletion
8
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,9 @@ | ||
requests | ||
getShaOfVersion: aString | ||
^ (WebClient httpGet: (self githubApiUrlForVersion: aString)) content parseAsJson at: 'sha' | ||
| response json | | ||
response := WebClient httpGet: (self githubApiUrlForVersion: aString). | ||
json := response content parseAsJson. | ||
response code = 200 ifFalse: [ | ||
^ self error: ('Error while trying to resolve git-s version {1}: {2}' | ||
format: {aString printString. json at: 'message'})]. | ||
^ json 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