Skip to content

Commit

Permalink
fix: escape command name in processTracer chart (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkraetzschmar authored Feb 17, 2024
1 parent 94c3c3d commit 6812198
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/processTracer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,14 @@ export async function report(

for (const command of filteredCommands) {
const extraProcessInfo: string | null = getExtraProcessInfo(command)
const escapedName = command.name.replace(/:/g, '#colon;')
if (extraProcessInfo) {
chartContent = chartContent.concat(
'\t',
`${command.name} (${extraProcessInfo}) : `
`${escapedName} (${extraProcessInfo}) : `
)
} else {
chartContent = chartContent.concat('\t', `${command.name} : `)
chartContent = chartContent.concat('\t', `${escapedName} : `)
}
if (command.exitCode !== 0) {
// to show red
Expand Down

0 comments on commit 6812198

Please sign in to comment.