UNPKG

@pagopa/dx-cli

Version:

A CLI useful to manage DX tools.

13 lines (12 loc) 535 B
import { Command } from "commander"; import * as process from "node:process"; import { printDoctorResult, runDoctor } from "../../../domain/doctor.js"; export const makeDoctorCommand = (dependencies, config) => new Command() .name("doctor") .description("Verify the repository setup according to the DevEx guidelines") .action(async () => { const result = await runDoctor(dependencies, config); printDoctorResult(dependencies, result); const exitCode = result.hasErrors ? 1 : 0; process.exit(exitCode); });