erlware / relx

Sane, simple release creation for Erlang
http://erlware.github.io/relx
Apache License 2.0
696 stars 233 forks source link

Bash error while running in a directory with space in the name #908

Closed dincho closed 2 years ago

dincho commented 2 years ago

Looks like the generated script cannot handle paths that include a space in them.

➜  Spaced Dir pwd
/tmp/Spaced Dir
➜  Spaced Dir rebar3 new app foo && cd foo 
===> Writing foo/src/foo_app.erl
===> Writing foo/src/foo_sup.erl
===> Writing foo/src/foo.app.src
===> Writing foo/rebar.config
===> Writing foo/.gitignore
===> Writing foo/LICENSE
===> Writing foo/README.md
➜  foo cat rebar.config
{erl_opts, [debug_info]}.
{deps, []}.

{shell, [
  % {config, "config/sys.config"},
    {apps, [foo]}
]}.

{relx, [{release, { foo, "0.1.0" }, [foo, sasl]},
        {extended_start_script, true}
}.
➜  foo rebar3 release
===> Verifying dependencies...
===> Analyzing applications...
===> Compiling foo
===> Assembling release foo-0.1.0...
===> Warnings generating release:
*WARNING* stdlib: Object code (filename) out of date
===> Release successfully assembled: _build/default/rel/foo
➜  foo _build/default/rel/foo/bin/foo status
sh: line 0: test: /private/tmp/Spaced: binary operator expected
Node is not running!
➜  foo rebar3 --version
rebar 3.18.0 on Erlang/OTP 22 Erts 10.7.2.16
tsloughter commented 2 years ago

This is an issue with the relx start script, could you open an issue in https://github.com/erlware/relx/

dincho commented 2 years ago

Hey @tsloughter, I'm confused, the link points to this repo ? :)

dincho commented 2 years ago

As a additional info, I don't think this affects the startup of the app, but I'm not sure what the script is trying to test actually

tsloughter commented 2 years ago

facepalm sorry, for some reason I thought this was in rebar3 repo :)

I'll take a look soon.