Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dincho opened this issue Mar 4, 2022 · 4 comments · Fixed by #915
Closed

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

dincho opened this issue Mar 4, 2022 · 4 comments · Fixed by #915

Comments

@dincho
Copy link

dincho commented Mar 4, 2022

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
Copy link
Member

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

@dincho
Copy link
Author

dincho commented Mar 4, 2022

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

@dincho
Copy link
Author

dincho commented Mar 4, 2022

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
Copy link
Member

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

I'll take a look soon.

sg2342 added a commit to sg2342/relx that referenced this issue May 18, 2022
when the argument to the system calls in check_name awk
script is built, the file part must be quoted.
if this is not done,
the system call will fail whenever the filename contains spaces

fix erlware#908
sg2342 added a commit to sg2342/relx that referenced this issue May 19, 2022
when the argument to the system calls in check_name awk
script is built, the file part must be quoted.
if this is not done,
the system call will fail whenever the filename contains spaces

fix erlware#908
sg2342 added a commit to sg2342/relx that referenced this issue May 19, 2022
when the argument to the system calls in check_name awk
script is built, the file part must be quoted.
if this is not done,
the system call will fail whenever the filename contains spaces

fix erlware#908
sg2342 added a commit to sg2342/relx that referenced this issue May 19, 2022
when the argument to the system calls in check_name awk
script is built, the file part must be quoted.
if this is not done,
the system call will fail whenever the filename contains special characters

fix erlware#908
sg2342 added a commit to sg2342/relx that referenced this issue May 19, 2022
when the argument to the system calls in check_name awk
script is built, the file part must be quoted.
if this is not done,
the system call will fail whenever the filename contains special characters

fix erlware#908
sg2342 added a commit to sg2342/relx that referenced this issue May 19, 2022
when the argument to the system calls in check_name awk
script is built, the file part must be quoted.
if this is not done,
the system call will fail whenever the filename contains special characters

fix erlware#908
sg2342 added a commit to sg2342/relx that referenced this issue May 24, 2022
when the argument to the system calls in check_name awk
script is built, the file part must be quoted.
if this is not done,
the system call will fail whenever the filename contains special characters

fix erlware#908
@ferd ferd closed this as completed in #915 May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants