diff --git a/src/git/gitProviderService.ts b/src/git/gitProviderService.ts index cff64d5..b18597a 100644 --- a/src/git/gitProviderService.ts +++ b/src/git/gitProviderService.ts @@ -571,12 +571,18 @@ export class GitProviderService implements Disposable { } static getProviderId(repoPath: string | Uri): GitProviderId { + if (repoPath == null) { + // eslint-disable-next-line no-debugger + debugger; + throw new Error('Unsupported provider; no repository path'); + } + if (typeof repoPath !== 'string' && repoPath.scheme === DocumentSchemes.VirtualFS) { if (repoPath.authority.startsWith('github')) { return GitProviderId.GitHub; } - throw new Error(`Unsupported scheme: ${repoPath.scheme}`); + throw new Error(`Unsupported provider: ${repoPath.scheme}`); } return GitProviderId.Git; diff --git a/src/views/nodes/fileHistoryTrackerNode.ts b/src/views/nodes/fileHistoryTrackerNode.ts index 8846fbe..309ca7b 100644 --- a/src/views/nodes/fileHistoryTrackerNode.ts +++ b/src/views/nodes/fileHistoryTrackerNode.ts @@ -133,8 +133,7 @@ export class FileHistoryTrackerNode extends SubscribeableViewNode