mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 10:17:16 +08:00
GitHost AutoConfigure: Show the error
It looks super ugly, but it's better than not showing anything.
This commit is contained in:
@ -31,15 +31,22 @@ class GitHostSetupAutoConfigureState extends State<GitHostSetupAutoConfigure> {
|
||||
gitHost.init(() async {
|
||||
print("GitHost Initalized: " + widget.gitHostType.toString());
|
||||
|
||||
var repo = await gitHost.createRepo("journal");
|
||||
GitRepo repo;
|
||||
try {
|
||||
repo = await gitHost.createRepo("journal");
|
||||
var publicKey = await generateSSHKeys(comment: "GitJournal");
|
||||
await gitHost.addDeployKey(publicKey, repo.fullName);
|
||||
|
||||
} on GitHostException catch (e) {
|
||||
print("GitHostSetupAutoConfigure: " + e.toString());
|
||||
setState(() {
|
||||
errorMessage = widget.gitHostType.toString() + ": " + e.toString();
|
||||
});
|
||||
}
|
||||
widget.onDone(repo.cloneUrl);
|
||||
});
|
||||
gitHost.launchOAuthScreen();
|
||||
} on GitHostException catch (e) {
|
||||
print("GitHostSetupAutoConfigur: " + e.toString());
|
||||
print("GitHostSetupAutoConfigure: " + e.toString());
|
||||
setState(() {
|
||||
errorMessage = widget.gitHostType.toString() + ": " + e.toString();
|
||||
});
|
||||
|
Reference in New Issue
Block a user