This commit is contained in:
Arwid Thornström
2022-01-21 13:34:56 +01:00
parent b4d3f789cf
commit fda1b42e9f
11 changed files with 43 additions and 29 deletions
+4 -3
View File
@@ -1,6 +1,7 @@
import { GluegunMenuToolbox } from '@lenne.tech/gluegun-menu';
import chalk = require('chalk');
import { system } from 'gluegun';
import { defaultMenuSettings } from '../../../globals';
const { Confirm, Input } = require('enquirer');
const checkCLIProgram = async (toolbox: GluegunMenuToolbox, cmd: string) => {
@@ -17,7 +18,7 @@ module.exports = {
name: 'settings',
alias: ['se'],
description: 'Setup settings for pwcli (se)',
hidden: true,
hidden: false,
run: async (toolbox: GluegunMenuToolbox) => {
const {print, system, strings} = toolbox;
@@ -123,9 +124,9 @@ module.exports = {
await system.run(`echo '${JSON.stringify(config)}' > ~/.pwcli_settings`);
} else {
print.info('Ok then.');
if (toolbox.fromMenu()) await toolbox.menu.showMenu();
if (toolbox.fromMenu()) await toolbox.menu.showMenu(null, defaultMenuSettings);
}
if (toolbox.fromMenu()) await toolbox.menu.showMenu();
if (toolbox.fromMenu()) await toolbox.menu.showMenu(null, defaultMenuSettings);
}
};