Skip to content

Commit dcfc662

Browse files
hjanuschkaeamodio
authored andcommitted
support for non https remotes
1 parent 7c281e1 commit dcfc662

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/git/remotes/provider.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export abstract class RemoteProvider {
4040
public readonly domain: string,
4141
public readonly path: string,
4242
name?: string,
43+
public readonly protocol: string = 'https'
4344
public readonly custom: boolean = false
4445
) {
4546
this._name = name;
@@ -48,7 +49,7 @@ export abstract class RemoteProvider {
4849
abstract get name(): string;
4950

5051
protected get baseUrl() {
51-
return `https://${this.domain}/${this.path}`;
52+
return `${this.protocol}://${this.domain}/${this.path}`;
5253
}
5354

5455
protected formatName(name: string) {
@@ -105,4 +106,4 @@ export abstract class RemoteProvider {
105106
openFile(fileName: string, branch?: string, sha?: string, range?: Range) {
106107
return this.openUrl(this.getUrlForFile(fileName, branch, sha, range));
107108
}
108-
}
109+
}

0 commit comments

Comments
 (0)