From 49a3b4781a7d1cdebba5bc2020d5cf7c592b06e8 Mon Sep 17 00:00:00 2001 From: "sheche@microsoft.com" Date: Sat, 22 Jun 2019 13:37:06 +0800 Subject: [PATCH] Remove the confirm step when removing a session --- lib/commands/session.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/commands/session.js b/lib/commands/session.js index 64d460d6..36b93e7c 100644 --- a/lib/commands/session.js +++ b/lib/commands/session.js @@ -99,24 +99,7 @@ cmd.handler = function(argv) { } if (argv.delete) { - log.info([ - chalk.red.bold('CAREFUL! This action CANNOT be undone!'), - '\nThis will permanently delete all your submissions', - 'and progress associated with this session.', - '\nAre you sure you want to delete this session?\n', - '\nPlease type in the session\'s', - chalk.yellow.bold('number of accepted submissions'), - 'to confirm.\n' - ].join(' ')); - - prompt.colors = false; - prompt.message = ''; - prompt.start(); - prompt.get([{name: 'answer', type: 'integer', required: true}], function(e, x) { - if (x.answer !== session.total_acs) return; - return core.deleteSession(session, printSessions); - }); - return; + return core.deleteSession(session, printSessions); } } printSessions(null, sessions);