From c6b16decf01416c796a7bdd6615ddcff31ccb23f Mon Sep 17 00:00:00 2001 From: Ningyuan Li Date: Sun, 17 Nov 2024 01:02:46 +0900 Subject: [PATCH] use luna-send-pub when the service is not elevated --- services/webos-service-remote/execbus.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/services/webos-service-remote/execbus.js b/services/webos-service-remote/execbus.js index 6f518c3..687b015 100644 --- a/services/webos-service-remote/execbus.js +++ b/services/webos-service-remote/execbus.js @@ -88,10 +88,11 @@ export default class Handle { */ // eslint-disable-next-line class-methods-use-this async call(uri, payload) { - const stdout = await asyncExecFile('luna-send', [ + const command = this.usePublic ? 'luna-send-pub' : 'luna-send'; + const stdout = await asyncExecFile(command, [ // FIXME: Dirty hack... We likely want to accept appid in constructor - '-a', - payload.sourceId ? payload.sourceId : 'webosbrew', + /* using -a with luna-send-pub causes an error */ + ...(this.usePublic ? [] : ['-a', payload.sourceId ? payload.sourceId : 'webosbrew']), '-n', '1', uri,