mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
Fix stf local not accepting multiple serials. Fixes #91.
This commit is contained in:
parent
b248e96dc2
commit
0942ecea7a
2 changed files with 5 additions and 18 deletions
15
lib/cli.js
15
lib/cli.js
|
@ -15,7 +15,7 @@ program
|
|||
.version(pkg.version)
|
||||
|
||||
program
|
||||
.command('provider [serial..]')
|
||||
.command('provider [serial...]')
|
||||
.description('start provider')
|
||||
.option('-s, --connect-sub <endpoint>'
|
||||
, 'sub endpoint'
|
||||
|
@ -76,10 +76,7 @@ program
|
|||
, 'whether to mute master volume when devices are being used')
|
||||
.option('--lock-rotation'
|
||||
, 'whether to lock rotation when devices are being used')
|
||||
.action(function() {
|
||||
var serials = cliutil.allUnknownArgs(arguments)
|
||||
, options = cliutil.lastArg(arguments)
|
||||
|
||||
.action(function(serials, options) {
|
||||
if (!options.connectSub) {
|
||||
this.missingArgument('--connect-sub')
|
||||
}
|
||||
|
@ -862,7 +859,7 @@ program
|
|||
})
|
||||
|
||||
program
|
||||
.command('local [serial..]')
|
||||
.command('local [serial...]')
|
||||
.description('start everything locally')
|
||||
.option('--bind-app-pub <endpoint>'
|
||||
, 'app pub endpoint'
|
||||
|
@ -972,10 +969,8 @@ program
|
|||
, 'whether to mute master volume when devices are being used')
|
||||
.option('--lock-rotation'
|
||||
, 'whether to lock rotation when devices are being used')
|
||||
.action(function() {
|
||||
.action(function(serials, options) {
|
||||
var log = logger.createLogger('cli:local')
|
||||
, args = arguments
|
||||
, options = cliutil.lastArg(args)
|
||||
, procutil = require('./util/procutil')
|
||||
|
||||
// Each forked process waits for signals to stop, and so we run over the
|
||||
|
@ -1040,7 +1035,7 @@ program
|
|||
.concat(options.allowRemote ? ['--allow-remote'] : [])
|
||||
.concat(options.muteMaster ? ['--mute-master'] : [])
|
||||
.concat(options.lockRotation ? ['--lock-rotation'] : [])
|
||||
.concat(cliutil.allUnknownArgs(args)))
|
||||
.concat(serials))
|
||||
|
||||
// auth
|
||||
, procutil.fork(__filename, [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue