Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: delete execa std props #314

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,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 vite-ecosystem-ci'
if (error.stderr) error.stderr = 'value removed by vite-ecosystem-ci'
if (error.stdio) error.stdio = ['value removed by vite-ecosystem-ci']
throw error
Comment on lines +55 to +61
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also possible to check with error instanceof ExecaError, but for some reason the types are different, e.g. it marked error.stdout: undefined, which is not true.

}

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