clone: Remove remote on fail

This way the repo isn't left in an invalid state.
This commit is contained in:
Vishesh Handa
2021-07-23 13:27:37 +02:00
parent 44666ea6f2
commit 796f7190ba

View File

@ -571,6 +571,8 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
} on Exception catch (e, stacktrace) {
Log.e("Failed to clone", ex: e, stacktrace: stacktrace);
error = e.toString();
await _removeRemote();
}
if (error != null && error.isNotEmpty) {