I have a running release app and need to do some maintenance by running some Elixir code. This works fine when doing it through iex by calling bin/RELEASE remote
and typing in the necessary code, but I want to streamline this proces by running the line of code using the rpc
command (or the eval
command, which gives the same issue).
Within bash, next to my release, if I try the following line it results in the error below:
RELEASE.sh eval "%{a: 1}"
** (SyntaxError) nofile:1:15: unexpected token: ":" (column 15, code point U+003A)
This seems to have something to do with the space being seen as a terminator but I have tried different ways of escaping it to no avail. I also tried with other lines and everything without spaces works fine, but with spaces gives the error. e.g.:
./release.sh rpc "'x'"
← seems to work
./release.sh rpc "' '"
← ** (TokenMissingError) nofile:1:2: missing terminator: ’
Any ideas how to get this to work?