( args: BaseReportArgs, )
| 453 | } |
| 454 | |
| 455 | export async function checkPrintConfig( |
| 456 | args: BaseReportArgs, |
| 457 | ): Promise<EnhancedPersistConfig | null> { |
| 458 | const { project, ctx, base } = args; |
| 459 | |
| 460 | const operation = project |
| 461 | ? `Executing print-config for project ${project.name}` |
| 462 | : 'Executing print-config'; |
| 463 | try { |
| 464 | const config = await printPersistConfig(ctx); |
| 465 | logDebug( |
| 466 | `${operation} verified code-pushup installed in base branch ${base.ref}`, |
| 467 | ); |
| 468 | return config; |
| 469 | } catch (error) { |
| 470 | logDebug(`Error from print-config - ${stringifyError(error)}`); |
| 471 | logInfo( |
| 472 | `${operation} failed, assuming code-pushup not installed in base branch ${base.ref} and skipping comparison`, |
| 473 | ); |
| 474 | return null; |
| 475 | } |
| 476 | } |
| 477 | |
| 478 | export async function printPersistConfig( |
| 479 | ctx: CommandContext, |
no test coverage detected