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
This commit is contained in:
Bernhard B 2026-10-02 17:19:00 +02:00
parent 80e0f34032
commit 72580cdef5

View File

@ -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"}...)