I’m currently building an Elixir application application release using distillery (https://hex.pm/packages/distillery). When I build the release, it suggests ways for me to run the release:
==> Release successfully built!
You can run it in one of the following ways:
Interactive: _build/prod/rel/yeti/bin/yeti console
Foreground: _build/prod/rel/yeti/bin/yeti foreground
Daemon: _build/prod/rel/yeti/bin/yeti start
Attempting to run one of those, however, gives me back:
<538>$ _build/prod/rel/yeti/bin/yeti console
usage: dirname path
I’ve traced this down to the file _build/prod/rel/yeti/erts-9.1.1/bin/erl
which I gather is a script that is added to my release when erts is coped in. Within that file I see:
...
SCRIPT_DIR=`dirname $0`
ROOTDIR=`cd $SCRIPT_DIR/../../ && pwd`
...
The bug here is that my release lives in a directory that has a space in it. The full path to the erl
script is /Users/sthompson/Library/Mobile Documents/com~apple~CloudDocs/Projects/Elixir/yeti/_build/prod/rel/yeti/erts-9.1.1/bin
(so there is a space in the path component Mobile Documents
).
If I edit the erl
script to:
...
SCRIPT_DIR=`dirname "$0"`
ROOTDIR=`cd "$SCRIPT_DIR/../../" && pwd`
...
So that the directories are enclosed in quotes, then the release seems to start up without trouble.
I want to report this to the folks that develop erts
but I’m not sure how or where to go about that. Can anyone please point me in the right direction?