feat(bin): ensure email exists

Signed-off-by: Erona <erona@loli.bz>
This commit is contained in:
Erona 2018-10-29 23:10:44 +08:00
parent e90d4d824b
commit 3abf1f04ed
No known key found for this signature in database
GPG Key ID: C9B930B72E7104C0
1 changed files with 4 additions and 0 deletions

View File

@ -108,6 +108,10 @@ if (opts.length === 0) {
if (opts.length > 1) { if (opts.length > 1) {
showUsage(`You cannot ${action.join(' and ')} at the same time!`); showUsage(`You cannot ${action.join(' and ')} at the same time!`);
} }
// Check if not string
if (typeof argv[action] !== 'string') {
showUsage(`You must follow an email after --${action}`);
}
// Call respective processing functions // Call respective processing functions
options[action](argv).then(function() { options[action](argv).then(function() {