This commit is contained in:
Andrea Lamparelli 2022-12-23 19:38:57 +01:00
parent 74703c48f3
commit 8828684a38
6 changed files with 13 additions and 14 deletions

View file

@ -40,8 +40,8 @@ class GitCLIService {
* Return the git version
* @returns {Promise<string | undefined>}
*/
async version() {
const rawOutput = await this.git().raw("version");
async version(cwd) {
const rawOutput = await this.git(cwd).raw("version");
const match = rawOutput.match(/(\d+\.\d+(\.\d+)?)/);
return match ? match[1] : undefined;
}