fix undefined error when ctrl+c in interactive menu
This commit is contained in:
parent
f27193163d
commit
33e7b7acfa
3
index.js
3
index.js
|
@ -16,6 +16,9 @@ const BACKUPS_DIRECTORY = path.join(CURRENT_FOLDER, 'backups');
|
|||
const TEMP_DIR = path.join(CURRENT_FOLDER, '.temp');
|
||||
|
||||
const run = async (programArgs) => {
|
||||
if (programArgs === undefined || programArgs.action === undefined) {
|
||||
return;
|
||||
}
|
||||
const ACTION = programArgs.action.toLowerCase();
|
||||
switch (ACTION) {
|
||||
case 'exit':
|
||||
|
|
Loading…
Reference in New Issue
Block a user