mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
remove unnecessary options from api unit. Improve error messages... etc etc
This commit is contained in:
parent
221bc78e49
commit
536e469e6f
5 changed files with 21 additions and 29 deletions
13
lib/cli.js
13
lib/cli.js
|
@ -871,22 +871,15 @@ program
|
|||
, 'secret (or $SECRET)'
|
||||
, String
|
||||
, process.env.SECRET)
|
||||
.option('-a, --auth-url <url>'
|
||||
, 'URL to auth client'
|
||||
, String)
|
||||
.action(function(options) {
|
||||
if (!options.secret) {
|
||||
this.missingArgument('--secret')
|
||||
}
|
||||
if (!options.authUrl) {
|
||||
this.missingArgument('--auth-url')
|
||||
}
|
||||
|
||||
require('./units/api')({
|
||||
port: options.port
|
||||
, ssid: options.ssid
|
||||
, secret: options.secret
|
||||
, authUrl: options.authUrl
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -1335,12 +1328,6 @@ program
|
|||
'api'
|
||||
, '--port', options.apiPort
|
||||
, '--secret', options.authSecret
|
||||
, '--auth-url', options.authUrl || util.format(
|
||||
'http://%s:%d/auth/%s/'
|
||||
, options.publicIp
|
||||
, options.poorxyPort
|
||||
, ({oauth2: 'oauth'}[options.authType]) || options.authType
|
||||
)
|
||||
])
|
||||
// websocket
|
||||
, procutil.fork(__filename, [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue