From 72580cdef59faa3fef0c8765dfbc47913e44f2b3 Mon Sep 17 00:00:00 2001 From: Bernhard B Date: Fri, 2 Oct 2026 17:19:00 +0200 Subject: [PATCH] fixed bug in json-rpc mode * first argument that is passed to the syscall.Exec needs to be the name of the executable. Since it was "--output=json" before, this string was used as the executable's name and not as argument. Therefore it was silently swallowed. see #892 --- src/scripts/jsonrpc2-helper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts/jsonrpc2-helper.go b/src/scripts/jsonrpc2-helper.go index 9773a9b..14d6cf3 100644 --- a/src/scripts/jsonrpc2-helper.go +++ b/src/scripts/jsonrpc2-helper.go @@ -25,8 +25,6 @@ func main() { var tcpPort int64 = 6001 jsonRpc2ClientConfig.AddEntry(utils.MULTI_ACCOUNT_NUMBER, utils.JsonRpc2ClientConfigEntry{TcpPort: tcpPort}) - args := []string{"--output=json", "--config", signalCliConfigDir} - signalCliBinary := "signal-cli" signalMode := utils.GetEnv("MODE", "json-rpc") if signalMode == "json-rpc-native" { @@ -35,6 +33,8 @@ func main() { log.Fatal("The mode needs to be either 'json-rpc' or 'json-rpc-native'") } + args := []string{signalCliBinary, "--output", "json", "--config", signalCliConfigDir} + trustNewIdentitiesEnv := utils.GetEnv("JSON_RPC_TRUST_NEW_IDENTITIES", "") if trustNewIdentitiesEnv == "on-first-use" { args = append(args, []string{"--trust-new-identities", "on-first-use"}...)