future-id/mdr-cli

View on GitHub
src/commands/get/host.ts

Summary

Maintainability
A
0 mins
Test Coverage
import chalk from "chalk";
import { Command, command, metadata } from "clime";
import { getConfig, logger } from "../../utils/Utils";

@command()
export default class extends Command {
    @metadata
    async execute(): Promise<void> {
        try {
            const config = await getConfig();
            logger.log(chalk.bold(config.host));
        } catch (e) {
            logger.error("Failed to get host");
        }
    }
}