You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug erlc will fail to run if it resides in a path that contains spaces (i.e., /foo/bar baz/erlc). This is due to the push_words function.
A fix was sent up in 2015, yet was reverted in f77436f a few months later, but without indication as to why.
Per the PR above, it seems this is a problem in multiple programs shipped with OTP.
To Reproduce
Install Erlang/OTP in a location with a parent directory that contains spaces
such as /tmp/foo bar/erlang_test , then try to invoke erlc (i.e., /tmp/foo bar/erlang_test/bin/erlc) , you should get an errno 2 exit.
Expected behavior
erlc and friends can successfully be invoked without issue when residing in a path containing spaces (i.e., the path to the emulator is not lopped off the first sign of space).
Affected versions
All versions of OTP post R13B
Additional context
This bug was noticed and reported by @tsloughter on erlanger slack.
The text was updated successfully, but these errors were encountered:
How odd! We test with a space (and unicode character) in the path for all our GH actions tests. Seems like for some reason that does not catch this problem. Will have to investigate.
Hmm, I ran the erlc_SUITE test suite and I found that it works there, it creats a script file that sets ERLC_EMULATOR=erl, when evaluating push_words, everything works fine. But erl might actually have the same path as erlc, but we rely on the OS way of finding the full path later.
If you set ERLC_EMULATOR=/some path with space/erl, then we get the same problem as before with push_words.
ERLC_EMULATOR - The command for starting the emulator. Defaults to erl in the same directory as the erlc program itself, or, if it does not exist, erl in any of the directories specified in environment variable PATH
I think we should try to add this fix again.
Maybe the problem with the original one is that if you set ERLC_EMULATOR="erl -cli_arg1 -cli_arg2" then just doing PUSH was not enough.
Describe the bug
erlc
will fail to run if it resides in a path that contains spaces (i.e.,/foo/bar baz/erlc
). This is due to the push_words function.A fix was sent up in 2015, yet was reverted in f77436f a few months later, but without indication as to why.
Per the PR above, it seems this is a problem in multiple programs shipped with OTP.
To Reproduce
Install Erlang/OTP in a location with a parent directory that contains spaces
such as
/tmp/foo bar/erlang_test
, then try to invoke erlc (i.e.,/tmp/foo bar/erlang_test/bin/erlc
) , you should get an errno 2 exit.Expected behavior
erlc and friends can successfully be invoked without issue when residing in a path containing spaces (i.e., the path to the emulator is not lopped off the first sign of space).
Affected versions
All versions of OTP post R13B
Additional context
This bug was noticed and reported by @tsloughter on erlanger slack.
The text was updated successfully, but these errors were encountered: