瀏覽代碼

support for non https remotes

main
Helmut Januschka 7 年之前
committed by Eric Amodio
父節點
當前提交
dcfc6626d4
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      src/git/remotes/provider.ts

+ 3
- 2
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));
}
}
}

Loading…
取消
儲存