mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 18:53:23 +02:00
Allow the cleanup plugin to be disabled. Resolves #346 and others. May
need a more generic method to disable individual plugins later.
This commit is contained in:
11
lib/cli.js
11
lib/cli.js
@@ -76,6 +76,8 @@ program
|
||||
, 'whether to mute master volume when devices are being used')
|
||||
.option('--lock-rotation'
|
||||
, 'whether to lock rotation when devices are being used')
|
||||
.option('-C, --no-cleanup'
|
||||
, 'do not attempt to clean up devices between uses')
|
||||
.action(function(serials, options) {
|
||||
if (!options.connectSub) {
|
||||
this.missingArgument('--connect-sub')
|
||||
@@ -116,7 +118,8 @@ program
|
||||
, '--vnc-initial-size', options.vncInitialSize.join('x')
|
||||
]
|
||||
.concat(options.muteMaster ? ['--mute-master'] : [])
|
||||
.concat(options.lockRotation ? ['--lock-rotation'] : []))
|
||||
.concat(options.lockRotation ? ['--lock-rotation'] : [])
|
||||
.concat(!options.cleanup ? ['--no-cleanup'] : []))
|
||||
}
|
||||
, endpoints: {
|
||||
sub: options.connectSub
|
||||
@@ -187,6 +190,8 @@ program
|
||||
, 'whether to mute master volume when devices are being used')
|
||||
.option('--lock-rotation'
|
||||
, 'whether to lock rotation when devices are being used')
|
||||
.option('-C, --no-cleanup'
|
||||
, 'do not attempt to clean up devices between uses')
|
||||
.action(function(serial, options) {
|
||||
if (!options.connectSub) {
|
||||
this.missingArgument('--connect-sub')
|
||||
@@ -231,6 +236,7 @@ program
|
||||
, heartbeatInterval: options.heartbeatInterval
|
||||
, muteMaster: options.muteMaster
|
||||
, lockRotation: options.lockRotation
|
||||
, cleanup: options.cleanup
|
||||
})
|
||||
})
|
||||
|
||||
@@ -1169,6 +1175,8 @@ program
|
||||
, 'whether to mute master volume when devices are being used')
|
||||
.option('--lock-rotation'
|
||||
, 'whether to lock rotation when devices are being used')
|
||||
.option('-C, --no-cleanup'
|
||||
, 'do not attempt to clean up devices between uses')
|
||||
.action(function(serials, options) {
|
||||
var log = logger.createLogger('cli:local')
|
||||
var procutil = require('./util/procutil')
|
||||
@@ -1235,6 +1243,7 @@ program
|
||||
.concat(options.allowRemote ? ['--allow-remote'] : [])
|
||||
.concat(options.muteMaster ? ['--mute-master'] : [])
|
||||
.concat(options.lockRotation ? ['--lock-rotation'] : [])
|
||||
.concat(!options.cleanup ? ['--no-cleanup'] : [])
|
||||
.concat(serials))
|
||||
|
||||
// auth
|
||||
|
||||
Reference in New Issue
Block a user