From dcfc6626d4cdd1da85f67577728643adc2b5e4b7 Mon Sep 17 00:00:00 2001 From: Helmut Januschka Date: Wed, 8 Nov 2017 15:54:21 +0100 Subject: [PATCH] support for non https remotes --- src/git/remotes/provider.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/git/remotes/provider.ts b/src/git/remotes/provider.ts index 62b478c..e3fe116 100644 --- a/src/git/remotes/provider.ts +++ b/src/git/remotes/provider.ts @@ -40,6 +40,7 @@ export abstract class RemoteProvider { public readonly domain: string, public readonly path: string, name?: string, + public readonly protocol: string = 'https' public readonly custom: boolean = false ) { this._name = name; @@ -48,7 +49,7 @@ export abstract class RemoteProvider { abstract get name(): string; protected get baseUrl() { - return `https://${this.domain}/${this.path}`; + return `${this.protocol}://${this.domain}/${this.path}`; } protected formatName(name: string) { @@ -105,4 +106,4 @@ export abstract class RemoteProvider { openFile(fileName: string, branch?: string, sha?: string, range?: Range) { return this.openUrl(this.getUrlForFile(fileName, branch, sha, range)); } -} \ No newline at end of file +}