@veecode-platform/safira-cli
Version:
Generate a microservice project from your spec.
20 lines (19 loc) • 791 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DoctorCurl = void 0;
const command_execute_1 = require("../command/command-execute");
const version_utils_1 = require("../utils/version-utils");
class DoctorCurl {
async execute() {
return command_execute_1.CommandExecute.instance.exec("curl --version", false).then(stdout => {
if (stdout) {
const curlVersion = version_utils_1.VersionUtils.extractVersion(stdout, /\d+(\.\d+){2,}/);
return (`Curl is healthy, Version installed ${curlVersion}`);
}
throw new Error("Curl is not installed");
}).catch((error) => {
throw new Error("Curl is not installed");
});
}
}
exports.DoctorCurl = DoctorCurl;