summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErona2018-10-29 23:10:44 +0800
committerErona2018-10-29 23:11:32 +0800
commit3abf1f04eda60532a0ff3b7b5b2fab783c0e6f44 (patch)
tree26341355e36dfb49106e98a9a1f4ea2b8eaf3235
parente90d4d824b3e75486e98c7498faedbc285876014 (diff)
feat(bin): ensure email exists
Signed-off-by: Erona <erona@loli.bz>
-rwxr-xr-xbin/manage_users4
1 files changed, 4 insertions, 0 deletions
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() {