[F] Fix git switch

This commit is contained in:
Azalea (on HyDEV-Daisy)
2022-07-25 01:55:07 -04:00
parent d0668e0ceb
commit 08bb89b9ac
+2
View File
@@ -10,6 +10,8 @@ print(f'Current url: {url}')
if url.startswith('http'):
print('> HTTP git remote detected, switching to SSH')
repo = url.split('github.com/')[-1]
if repo.endswith('.git'):
repo = repo[:-4]
print(f'> Repo detected: {repo}')
new_url = f'git@github.com:{repo}.git'