From 3abf1f04eda60532a0ff3b7b5b2fab783c0e6f44 Mon Sep 17 00:00:00 2001 From: Erona Date: Mon, 29 Oct 2018 23:10:44 +0800 Subject: feat(bin): ensure email exists Signed-off-by: Erona --- bin/manage_users | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bin') diff --git a/bin/manage_users b/bin/manage_users index b23a0c5a..8c356200 100755 --- a/bin/manage_users +++ b/bin/manage_users @@ -108,6 +108,10 @@ if (opts.length === 0) { if (opts.length > 1) { 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 options[action](argv).then(function() { -- cgit v1.2.3