replace commands['ps'] with commands.ps which is suggested by ESLint

This commit is contained in:
song
2018-02-04 20:59:59 +08:00
parent b0c8be8685
commit 963de7fbd0

View File

@@ -50,17 +50,17 @@ devutil.listPidsByComm = function(adb, serial, comm, bin) {
.then(function(properties) {
var version = properties['ro.build.version.release']
if (version.match(/^8\./) !== null) {
commands["ps"] = 'ps -lef'
commands.ps = 'ps -lef'
}
else {
commands["ps"] = 'ps'
commands.ps = 'ps'
}
resolve(commands)
})
}
})
.then(function(commands) {
return adb.shell(serial, [commands["ps"]])
return adb.shell(serial, [commands.ps])
.then(function(out) {
return new Promise(function(resolve) {
var header = true