Fix: read git branch from project path git repo
parent
c4ddb44d27
commit
47a13c3787
|
|
@ -5435,7 +5435,7 @@ class GitRepoReader {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
console_1.assert(fs_1.default.existsSync(`.git`));
|
console_1.assert(fs_1.default.existsSync(`.git`));
|
||||||
return (yield cloud_runner_system_1.CloudRunnerSystem.Run(`git branch --show-current`, false, true))
|
return (yield cloud_runner_system_1.CloudRunnerSystem.Run(`cd ${input_1.default.projectPath} && git branch --show-current`, false, true))
|
||||||
.split('\n')[0]
|
.split('\n')[0]
|
||||||
.replace(/ /g, ``)
|
.replace(/ /g, ``)
|
||||||
.replace('/head', '');
|
.replace('/head', '');
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -27,7 +27,7 @@ export class GitRepoReader {
|
||||||
}
|
}
|
||||||
assert(fs.existsSync(`.git`));
|
assert(fs.existsSync(`.git`));
|
||||||
|
|
||||||
return (await CloudRunnerSystem.Run(`git branch --show-current`, false, true))
|
return (await CloudRunnerSystem.Run(`cd ${Input.projectPath} && git branch --show-current`, false, true))
|
||||||
.split('\n')[0]
|
.split('\n')[0]
|
||||||
.replace(/ /g, ``)
|
.replace(/ /g, ``)
|
||||||
.replace('/head', '');
|
.replace('/head', '');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue