Skip to content
Snippets Groups Projects
Commit 04b19d17 authored by Moul's avatar Moul
Browse files

[fix] wrong options throwed as error when forgoten with gen-* cmd.

parent 45278c7d
No related branches found
No related tags found
1 merge request!1265[fix] wrong options throwed as error when forgoten with gen-* cmd.
...@@ -145,13 +145,13 @@ function generateAndSend(program:any, difficulty:string, server:Server, getGener ...@@ -145,13 +145,13 @@ function generateAndSend(program:any, difficulty:string, server:Server, getGener
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (!program.submitLocal) { if (!program.submitLocal) {
if (!program.submitHost) { if (!program.submitHost) {
throw 'Option --submitHost is required.' throw 'Option --submit-host is required.'
} }
if (!program.submitPort) { if (!program.submitPort) {
throw 'Option --submitPort is required.' throw 'Option --submit-port is required.'
} }
if (isNaN(parseInt(program.submitPort))) { if (isNaN(parseInt(program.submitPort))) {
throw 'Option --submitPort must be a number.' throw 'Option --submit-port must be a number.'
} }
} }
async.waterfall([ async.waterfall([
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment