hide git rev-parse --show-toplevel

This commit is contained in:
João Moreno
2020-07-06 09:49:00 +02:00
parent 2e8b1458ad
commit 96e3e0f05f

View File

@@ -419,7 +419,7 @@ export class Git {
}
async getRepositoryRoot(repositoryPath: string): Promise<string> {
const result = await this.exec(repositoryPath, ['rev-parse', '--show-toplevel']);
const result = await this.exec(repositoryPath, ['rev-parse', '--show-toplevel'], { log: false });
// Keep trailing spaces which are part of the directory name
const repoPath = path.normalize(result.stdout.trimLeft().replace(/[\r\n]+$/, ''));