fix: check if repo is cloned via ssh before transforming

This commit is contained in:
iCrawl 2021-04-14 16:01:24 +02:00
parent 7cefeb2af8
commit 25b02aeb39
No known key found for this signature in database
GPG key ID: 1AB888B16355FBB2
3 changed files with 5 additions and 3 deletions

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "discord-vscode",
"version": "5.6.0",
"version": "5.6.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -1,7 +1,7 @@
{
"name": "discord-vscode",
"displayName": "Discord Presence",
"version": "5.6.0",
"version": "5.6.1",
"description": "Update your discord status with a rich presence.",
"private": true,
"author": {

View file

@ -78,7 +78,9 @@ export async function activity(previous: ActivityPayload = {}) {
let repo = git.repositories.find((repo) => repo.ui.selected)?.state.remotes[0].fetchUrl;
if (repo) {
repo = repo.replace(':', '/').replace('git@', 'https://').replace('.git', '');
if (repo.startsWith('git@')) {
repo = repo.replace(':', '/').replace('git@', 'https://').replace('.git', '');
}
state = {
...state,