From 99c8eb699429785a11e02090b54de275b498991f Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 25 Mar 2021 18:24:21 -0400 Subject: [PATCH] Fixes regex - codespaces remotes are missing .git --- extensions/github/src/pushErrorHandler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/github/src/pushErrorHandler.ts b/extensions/github/src/pushErrorHandler.ts index 379a8fd32a7..30a5c64d8e9 100644 --- a/extensions/github/src/pushErrorHandler.ts +++ b/extensions/github/src/pushErrorHandler.ts @@ -166,8 +166,8 @@ export class GithubPushErrorHandler implements PushErrorHandler { return false; } - const match = /^https:\/\/github\.com\/([^/]+)\/([^/]+)\.git/i.exec(remoteUrl) - || /^git@github\.com:([^/]+)\/([^/]+)\.git/i.exec(remoteUrl); + const match = /^https:\/\/github\.com\/([^/]+)\/([^/]+)(?:\.git)?/i.exec(remoteUrl) + || /^git@github\.com:([^/]+)\/([^/]+)(?:\.git)?/i.exec(remoteUrl); if (!match) { return false;