Skip to content

Commit

Permalink
fix: delete execa std props (vitejs/vite-ecosystem-ci#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored and haoqunjiang committed Jun 14, 2024
1 parent deaee59 commit 64dbba3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,18 @@ export async function $$(literals: TemplateStringsArray, ...values: any[]) {
proc.stdin && process.stdin.pipe(proc.stdin)
proc.stdout && proc.stdout.pipe(process.stdout)
proc.stderr && proc.stderr.pipe(process.stderr)
const result = await proc

let result
try {
result = await proc
} catch (error) {
// Since we already piped the io to the parent process, we remove the duplicated
// messages here so it's easier to read the error message.
if (error.stdout) error.stdout = 'value removed by vuejs ecosystem-ci'
if (error.stderr) error.stderr = 'value removed by vuejs ecosystem-ci'
if (error.stdio) error.stdio = ['value removed by vuejs ecosystem-ci']
throw error
}

if (isGitHubActions) {
actionsCore.endGroup()
Expand Down

0 comments on commit 64dbba3

Please sign in to comment.