Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 16a383f

Browse files
authored
Remove the confirm step when removing a session (leetcode-tools#18)
1 parent 8cf39b5 commit 16a383f

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

‎lib/commands/session.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,7 @@ cmd.handler = function(argv) {
9999
}
100100

101101
if (argv.delete) {
102-
log.info([
103-
chalk.red.bold('CAREFUL! This action CANNOT be undone!'),
104-
'\nThis will permanently delete all your submissions',
105-
'and progress associated with this session.',
106-
'\nAre you sure you want to delete this session?\n',
107-
'\nPlease type in the session\'s',
108-
chalk.yellow.bold('number of accepted submissions'),
109-
'to confirm.\n'
110-
].join(' '));
111-
112-
prompt.colors = false;
113-
prompt.message = '';
114-
prompt.start();
115-
prompt.get([{name: 'answer', type: 'integer', required: true}], function(e, x) {
116-
if (x.answer !== session.total_acs) return;
117-
return core.deleteSession(session, printSessions);
118-
});
119-
return;
102+
return core.deleteSession(session, printSessions);
120103
}
121104
}
122105
printSessions(null, sessions);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /