Git - Unsafe repositories flow polish (#167728)

This commit is contained in:
Ladislau Szomoru
2022-11-30 16:39:59 +01:00
committed by GitHub
parent c9d310b5f0
commit d0b47f6c30
5 changed files with 76 additions and 95 deletions

View File

@@ -686,6 +686,9 @@ export class Git {
}
async addSafeDirectory(repositoryPath: string): Promise<void> {
// safe.directory only supports paths with `/` as separator
repositoryPath = repositoryPath.replaceAll('\\', '/');
await this.exec(repositoryPath, ['config', '--global', '--add', 'safe.directory', repositoryPath]);
return;
}