"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.PackageManagerGetCommand = void 0;
const yok_1 = require("../yok");
class PackageManagerGetCommand {
    constructor($errors, $logger, $userSettingsService) {
        this.$errors = $errors;
        this.$logger = $logger;
        this.$userSettingsService = $userSettingsService;
        this.allowedParameters = [];
    }
    execute(args) {
        return __awaiter(this, void 0, void 0, function* () {
            if (args && args.length) {
                this.$errors.failWithHelp(`The arguments '${args.join(" ")}' are not valid for the 'package-manager get' command.`);
            }
            const result = yield this.$userSettingsService.getSettingValue("packageManager");
            this.$logger.printMarkdown(`Your current package manager is \`${result || "npm"}\`.`);
        });
    }
}
exports.PackageManagerGetCommand = PackageManagerGetCommand;
yok_1.injector.registerCommand("package-manager|*get", PackageManagerGetCommand);
//# sourceMappingURL=package-manager-get.js.map