mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-17 12:10:22 -05:00
Git - do not try to resolve workspace folders that do not use the file scheme (#173546)
This commit is contained in:
@@ -788,11 +788,14 @@ export class Model implements IRemoteSourcePublisherRegistry, IPostCommitCommand
|
||||
}
|
||||
|
||||
private async isRepositoryOutsideWorkspace(repositoryPath: string): Promise<boolean> {
|
||||
if (!workspace.workspaceFolders || workspace.workspaceFolders.length === 0) {
|
||||
const workspaceFolders = (workspace.workspaceFolders || [])
|
||||
.filter(folder => folder.uri.scheme === 'file');
|
||||
|
||||
if (workspaceFolders.length === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const result = await Promise.all(workspace.workspaceFolders.map(async folder => {
|
||||
const result = await Promise.all(workspaceFolders.map(async folder => {
|
||||
const workspaceFolderRealPath = await this.getWorkspaceFolderRealPath(folder);
|
||||
return workspaceFolderRealPath ? pathEquals(workspaceFolderRealPath, repositoryPath) || isDescendant(workspaceFolderRealPath, repositoryPath) : undefined;
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user