When user supplied arguments to pleroma_ctl include whitespace
that has been properly quoted, all arguments were sent to
ReleaseTasks in one string, which then String.split/1 the input on any
whitespace. This broke Mix tasks that accept certain user input like
instance gen and user management.
To fix this, pleroma_ctl now sends the arguments in list
form. Additionally pleroma_ctl arguments now need to be pre-processed.
Fixespleroma/pleroma#7874
From realpath(1) in POSIX 202x Draft 4.1:
> If file does not name a symbolic link, readlink shall write a diagnostic
> message to standard error and exit with non-zero status.
Which also doesn't includes `-f`, in preference of `realpath`.
This patch changes pleroma_ctl to call into a running instance instead of spinning up
a new one for mix task execution. This significantly decreases the time needed
for mix task execution (on my machine for `pleroma_ctl user set rin --no-admin`
the difference is 0.2s vs 4.2s) and allows mix tasks to affect the
instance context, for example, this allows to clear the cache after user
deletion