UNPKG

@veecode-platform/safira-cli

Version:

Generate a microservice project from your spec.

20 lines (19 loc) 781 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.DoctorGit = void 0; const version_utils_1 = require("../utils/version-utils"); const command_execute_1 = require("../command/command-execute"); class DoctorGit { async execute() { return command_execute_1.CommandExecute.instance.exec("git --version", false).then(stdout => { if (stdout) { const gitVersion = version_utils_1.VersionUtils.extractVersion(stdout, /\d+(\.\d+){2,}/); return (`Git is healthy, Version installed ${gitVersion}`); } throw new Error("Git is not installed"); }).catch((error) => { throw new Error("Git is not installed"); }); } } exports.DoctorGit = DoctorGit;