mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 17:53:24 +02:00
Ignore remote devices by default, use -R or --allow-remote to override.
This commit is contained in:
@@ -58,6 +58,8 @@ program
|
||||
, 'ADB port (defaults to 5037)'
|
||||
, Number
|
||||
, 5037)
|
||||
.option('-R, --allow-remote'
|
||||
, 'Whether to allow remote devices to be set up')
|
||||
.option('--screen-ws-url-pattern <pattern>'
|
||||
, 'screen WebSocket URL pattern'
|
||||
, String
|
||||
@@ -83,6 +85,7 @@ program
|
||||
, filter: function(device) {
|
||||
return serials.length === 0 || serials.indexOf(device.id) !== -1
|
||||
}
|
||||
, allowRemote: options.allowRemote
|
||||
, fork: function(device, ports) {
|
||||
var fork = require('child_process').fork
|
||||
return fork(__filename, [
|
||||
@@ -885,6 +888,8 @@ program
|
||||
, 'ADB port (defaults to 5037)'
|
||||
, Number
|
||||
, 5037)
|
||||
.option('-R, --allow-remote'
|
||||
, 'Whether to allow remote devices to be set up')
|
||||
.option('--user-profile-url <url>'
|
||||
, 'URL to external user profile page'
|
||||
, String)
|
||||
@@ -949,7 +954,9 @@ program
|
||||
, util.format('http://localhost:%d/', options.poorxyPort)
|
||||
, '--adb-host', options.adbHost
|
||||
, '--adb-port', options.adbPort
|
||||
].concat(cliutil.allUnknownArgs(args)))
|
||||
]
|
||||
.concat(options.allowRemote ? ['--allow-remote'] : [])
|
||||
.concat(cliutil.allUnknownArgs(args)))
|
||||
|
||||
// auth
|
||||
, procutil.fork(__filename, [
|
||||
|
||||
Reference in New Issue
Block a user