@cliz/gpm
Version:
Git Project Manager
24 lines (23 loc) • 802 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const cli_1 = require("@cliz/cli");
const core_1 = require("../../core");
exports.default = (0, cli_1.defineSubCommand)((createCommand) => {
return createCommand('Set gpm config')
.argument('<key>', 'The Config Key')
.argument('<value>', 'The Config Value')
.option('-g, --global', 'Get global config')
.action(async ({ args }) => {
try {
const key = args.key;
const value = args.value;
// const global = options.global as any as boolean;
//
await core_1.default.prepare();
core_1.default.config.set(key, value, true);
}
catch (error) {
console.error(error);
}
});
});