Fix: read git branch from project path git repo

pull/419/head
Frostebite 2022-08-11 03:38:42 +01:00
parent c4ddb44d27
commit 47a13c3787
3 changed files with 3 additions and 3 deletions

2
dist/index.js vendored
View File

@ -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', '');

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -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', '');