From efc3db218c414c1e732e622317d298f8ff2323fc Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 6 Jan 2020 00:50:59 -0500 Subject: [PATCH] Fixes wrong remote disconnection --- src/commands/remoteProviders.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/remoteProviders.ts b/src/commands/remoteProviders.ts index 9023215..92f0a51 100644 --- a/src/commands/remoteProviders.ts +++ b/src/commands/remoteProviders.ts @@ -94,7 +94,7 @@ export class DisconnectRemoteProviderCommand extends Command { async execute(args?: DisconnectRemoteProviderCommandArgs): Promise { if (args?.repoPath == null || args?.remote == null) return undefined; - const remote = (await Container.git.getRemotes(args.repoPath)).find(r => args.remote); + const remote = (await Container.git.getRemotes(args.repoPath)).find(r => r.name === args.remote); if (!remote?.provider?.hasApi()) return undefined; return remote.provider.disconnect();