Setup: Init repo if something went wrong

Again, I'm not sure what is going wrong, but I think it's better to just
try and fix it, than reporting an error to over 100 users.

Fixes APP-JR
This commit is contained in:
Vishesh Handa
2021-03-02 10:38:48 +01:00
parent 45b08a3335
commit 9d12848289

View File

@ -427,6 +427,9 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
var repoPath = p.join(basePath, widget.repoFolderName);
try {
if (!await GitRepository.isValidRepo(repoPath)) {
await GitRepository.init(repoPath);
}
var repo = await GitRepository.load(repoPath);
await repo.removeRemote(widget.remoteName);
} on Exception catch (e, stacktrace) {