fix undefined error when ctrl+c in interactive menu

This commit is contained in:
HorizonCode 2022-08-10 14:32:56 +02:00
parent f27193163d
commit 33e7b7acfa

View File

@ -16,6 +16,9 @@ const BACKUPS_DIRECTORY = path.join(CURRENT_FOLDER, 'backups');
const TEMP_DIR = path.join(CURRENT_FOLDER, '.temp'); const TEMP_DIR = path.join(CURRENT_FOLDER, '.temp');
const run = async (programArgs) => { const run = async (programArgs) => {
if (programArgs === undefined || programArgs.action === undefined) {
return;
}
const ACTION = programArgs.action.toLowerCase(); const ACTION = programArgs.action.toLowerCase();
switch (ACTION) { switch (ACTION) {
case 'exit': case 'exit':