mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Fixes #81158
This commit is contained in:
@@ -370,7 +370,8 @@ export class Git {
|
||||
|
||||
async getRepositoryRoot(repositoryPath: string): Promise<string> {
|
||||
const result = await this.exec(repositoryPath, ['rev-parse', '--show-toplevel']);
|
||||
return path.normalize(result.stdout.trim());
|
||||
// Keep trailing spaces which are part of the directory name
|
||||
return path.normalize(result.stdout.trimLeft().replace(/(\r\n|\r|\n)+$/, ''));
|
||||
}
|
||||
|
||||
async getRepositoryDotGit(repositoryPath: string): Promise<string> {
|
||||
|
||||
Reference in New Issue
Block a user