Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
`node.externalAddresses` cannot be set with `rad config` due to invalid type
Open shirahara opened 5 months ago
$ rad config set node.externalAddresses "0.0.0.0:8080"

Running it fails due to the error as below:

✗ Error: writing configuration to "/home/user/.radicle/config.json" failed: validation failure due to invalid type: string "0.0.0.0:8080", expected a sequence

Running rad config set node.externalAddresses ["0.0.0.0:8080"] also fails due to the error:

validation failure due to invalid type: string "[0.0.0.0:8080]", expected a sequence

I believe this would be a bug, and I’d like a correct command if it is not.

Thanks in advance.

levitte commented 3 months ago

The error message is rubbish, of course. That’s the bug.

The error should say that node.externalAddress must be a valid and routable address. 0.0.0.0 isn’t.

(side note: Could it be that you’re confusing the ‘externalAddress’ config property with the ‘listen’ property?)

fintohaps commented 2 months ago

I believe the issue here is that set is used for scalar values.

If you use push instead, that will push the value to an empty array.