Fix deviceClient invocations in minicap (#201)

This commit is contained in:
Karol Wrótniak
2021-03-10 13:52:47 +01:00
committed by GitHub
parent f21140acf7
commit 50ee38c2ce

View File

@@ -64,7 +64,7 @@ module.exports = syrup.serial()
}
function removeResource(res) {
return deviceClient.shell(options.serial, ['rm', '-f', res.dest])
return deviceClient.shell(['rm', '-f', res.dest])
.timeout(10000)
.then(function(out) {
return streamutil.readAll(out)
@@ -73,7 +73,7 @@ module.exports = syrup.serial()
}
function pushResource(res) {
return deviceClient.push(options.serial, res.src, res.dest, res.mode)
return deviceClient.push(res.src, res.dest, res.mode)
.timeout(10000)
.then(function(transfer) {
return new Promise(function(resolve, reject) {
@@ -88,7 +88,7 @@ module.exports = syrup.serial()
log.info('Installing "%s" as "%s"', res.src, res.dest)
function checkExecutable(res) {
return deviceClient.stat(options.serial, res.dest)
return deviceClient.stat(res.dest)
.timeout(5000)
.then(function(stats) {
// Can't use fs.constants.S_IXUSR due to differences on Windows.
@@ -138,7 +138,7 @@ module.exports = syrup.serial()
bin: resources.bin.dest
, lib: resources.lib.dest
, run: function(cmd) {
return deviceClient.shell(options.serial, util.format(
return deviceClient.shell(util.format(
'LD_LIBRARY_PATH=%s exec %s %s'
, path.dirname(resources.lib.dest)
, resources.bin.dest