mirror of
https://github.com/kiegroup/git-backporting.git
synced 2025-06-30 06:33:47 +00:00
minors
This commit is contained in:
parent
74703c48f3
commit
8828684a38
6 changed files with 13 additions and 14 deletions
|
@ -46,8 +46,8 @@ export default class GitCLIService {
|
|||
* Return the git version
|
||||
* @returns {Promise<string | undefined>}
|
||||
*/
|
||||
async version(): Promise<string | undefined> {
|
||||
const rawOutput = await this.git().raw("version");
|
||||
async version(cwd: string): Promise<string | undefined> {
|
||||
const rawOutput = await this.git(cwd).raw("version");
|
||||
const match = rawOutput.match(/(\d+\.\d+(\.\d+)?)/);
|
||||
return match ? match[1] : undefined;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue