fix: improve push to github option (#1111)

* feat: better push to githubbutton

* added url update on push to github
This commit is contained in:
Anirban Kar
2025-01-27 17:58:25 +05:30
committed by GitHub
parent df766c98d4
commit 6d4196a2b4
7 changed files with 95 additions and 19 deletions

View File

@@ -92,6 +92,7 @@ export function useGit() {
},
onAuthFailure: (url, _auth) => {
toast.error(`Error Authenticating with ${url.split('/')[2]}`);
throw `Error Authenticating with ${url.split('/')[2]}`;
},
onAuthSuccess: (url, auth) => {
saveGitAuth(url, auth);
@@ -107,6 +108,8 @@ export function useGit() {
return { workdir: webcontainer.workdir, data };
} catch (error) {
console.error('Git clone error:', error);
// toast.error(`Git clone error ${(error as any).message||""}`);
throw error;
}
},