From 25b02aeb3939740131c00998357fd77f9e1aaf83 Mon Sep 17 00:00:00 2001 From: iCrawl Date: Wed, 14 Apr 2021 16:01:24 +0200 Subject: [PATCH] fix: check if repo is cloned via ssh before transforming --- package-lock.json | 2 +- package.json | 2 +- src/activity.ts | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 695ffc5..db986ff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "discord-vscode", - "version": "5.6.0", + "version": "5.6.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 344ad63..15b4560 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/activity.ts b/src/activity.ts index 7f5d8d0..5da275d 100644 --- a/src/activity.ts +++ b/src/activity.ts @@ -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,