mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 22:51:30 -07:00
21 lines
436 B
TypeScript
21 lines
436 B
TypeScript
export function getOutcome({
|
|
exitCode,
|
|
skippedCode,
|
|
}: {
|
|
exitCode: number | null
|
|
skippedCode?: number
|
|
}) {
|
|
if (exitCode === 0) {
|
|
return chalk.green('Success!')
|
|
} else if (exitCode === skippedCode) {
|
|
return chalk.yellow('Skipped')
|
|
} else {
|
|
return chalk.red(`Failed with code: ${exitCode}`)
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Non-zero exit code used to indicate "skipped due to shfmt/rg unavailable"
|
|
*/
|
|
export const SHFMT_SKIPPED_EXIT_CODE = 113
|