Skip to content

Commit

Permalink
update dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
bitmaskit committed Jan 31, 2025
1 parent 660a52d commit c1128a0
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
20 changes: 18 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

19 changes: 17 additions & 2 deletions src/execute.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { exec, type ExecOptions } from '@actions/exec'
import path from 'path'
import { internalActionVariables } from './piper'
import { debug, error, info } from '@actions/core'

export interface piperExecResult {
output: string
Expand All @@ -16,12 +17,26 @@ export async function executePiper (
let options = {
listeners: {
stdout: (data: Buffer) => {
debug('about to print some data from options.listeners.stdout')
const outString = data.toString()
piperOutput += outString.includes('fatal') ? toRedConsole(outString) : outString
outString.split('\n').forEach(line => {
// TODO: This is a temporary fix to highlight errors in red
// test if ::error:: should be appended to the piperOutput
if (line.toLowerCase().includes('fatal')) {
error(`::error::${line}`) // GitHub Actions highlights this in red
} else {
info(line)
}
piperOutput += line + '\n'
})
},
stderr: (data: Buffer) => {
debug('about to print some data from options.listeners.stderr')
const outString = data.toString()
piperError += outString.includes('fatal') ? toRedConsole(outString) : outString
outString.split('\n').forEach(line => {
error(`::error::${line}`) // Treat stderr as errors
piperError += line + '\n'
})
}
}
}
Expand Down

0 comments on commit c1128a0

Please sign in to comment.