Skip to content

Commit

Permalink
Merge pull request #1392 from glensc/log-details
Browse files Browse the repository at this point in the history
Refactor: Put long node error inside html details
  • Loading branch information
orta committed Jul 31, 2023
2 parents b0e5f37 + 5855ac9 commit c561731
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/commands/utils/reporting.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DangerResults } from "../../dsl/DangerResults"

export const markdownCode = (string: string): string => `
\`\`\`sh
\`\`\`
${string}
\`\`\`
`
Expand Down
3 changes: 2 additions & 1 deletion source/commands/utils/runDangerSubprocess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ export const runDangerSubprocess = (
d(`Handling fail from subprocess`)
process.exitCode = code

const failResults = resultsWithFailure(`\`${processDisplayName}\` failed.`, "### Log\n\n" + markdownCode(allLogs))
const moreMarkdown = "### Log\n\n<details>\n\n" + markdownCode(allLogs) + "\n\n</details>\n"
const failResults = resultsWithFailure(`\`${processDisplayName}\` failed.`, moreMarkdown)
if (results) {
results = mergeResults(results, failResults)
} else {
Expand Down

0 comments on commit c561731

Please sign in to comment.