Find last json blob in gitversion stdout instead of first
This commit is contained in:
committed by
Artur
parent
2e44bffa9c
commit
c25ec1dc11
@@ -42,8 +42,8 @@ export async function run() {
|
||||
const result = await gitVersionTool.run(settings)
|
||||
const { stdout } = result
|
||||
const jsonOutput = stdout.substring(
|
||||
stdout.indexOf('{'),
|
||||
stdout.indexOf('}') + 1
|
||||
stdout.lastIndexOf('{'),
|
||||
stdout.lastIndexOf('}') + 1
|
||||
)
|
||||
|
||||
const gitversion = JSON.parse(jsonOutput) as GitVersionOutput
|
||||
|
||||
Reference in New Issue
Block a user