Closed kektobiologist closed 4 years ago
I can't recall of a workaround for it. As you said, the patch in #480 seemed to address it, but it appears it also contained a bunch of other things that might not have been desirable. I don't think there would be a huge problem adding support for consult-style RPC arguments, although I'd be worried of breaking existing toolchains of tools deployed in the wild.
Ah it turns out by reading the source code that there already is added support for it, and gave it a new name. Just use rpcterms
instead of rpc
: https://github.com/erlware/relx/blob/master/priv/templates/nodetool#L47-L55
I've tried rpcterms, it gives the same result. Can you share a working example? The only example in the source code calls a function with no arguments
I am also facing the same issue while using rpcterms to pass multiple arguments to a function. can someone explain how to use rpcterms in case if function requires multiple arguments.
Yeah I'm trying it again and it seems like the rpcterms feature is buggy. It handles single arguments almost fine (globs spaces):
_build/default/rel/chk/bin/chk rpcterms erlang display '[this, is, a, <<"term">>, "Hello world~n!"]. '
displays [this,is,a,<<"term">>,"Helloworld~n!"]
, but it won't work with multiple arguments easy. I'm guessing this stuff needs to be reworked.
This has been resolved in master and will be in the upcoming release. rpcterms
has been removed and replaced with just the rpc
command with an improved way of calling it.
To call foo:bar(1,2,3)
:
bin/<release_script> rpc foo bar "[1,2,3]."
eg.
This currently calls it with a single argument
["a","b"]
instead of two arguments. Is there a way to call a function with multiple arguments? I couldn't find any documentation related to this. #480 seemed to address the issue but it's not merged.