mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-26 16:46:51 +08:00
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:
@ -427,6 +427,9 @@ class GitHostSetupScreenState extends State<GitHostSetupScreen> {
|
|||||||
var repoPath = p.join(basePath, widget.repoFolderName);
|
var repoPath = p.join(basePath, widget.repoFolderName);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if (!await GitRepository.isValidRepo(repoPath)) {
|
||||||
|
await GitRepository.init(repoPath);
|
||||||
|
}
|
||||||
var repo = await GitRepository.load(repoPath);
|
var repo = await GitRepository.load(repoPath);
|
||||||
await repo.removeRemote(widget.remoteName);
|
await repo.removeRemote(widget.remoteName);
|
||||||
} on Exception catch (e, stacktrace) {
|
} on Exception catch (e, stacktrace) {
|
||||||
|
Reference in New Issue
Block a user