[erlang-bugs] Colons in ERL_LIBS

Anthony Ramine <>
Fri Jul 5 16:00:03 CEST 2013


Hello Matwey,

Character `:` is a path delimiter. Bash itself does not understand paths containing `:` in `$PATH`. You should not use paths containing a colon.

$ mkdir foo:bar
$ cd foo\:bar/
$ ln -s $(which true) gagagou
$ cd -
/Users/nox
$ gagagou
-bash: gagagou: command not found
$ export PATH="`pwd`/foo\:bar:$PATH"
$ echo $PATH
/Users/nox/foo\:bar:/Users/nox/.cabal/bin:/Users/nox/bin:/usr/local/Cellar/ruby/2.0.0-p247/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/X11/bin:/usr/texbin
$ gagagou
-bash: gagagou: command not found
$ mv foo:bar foobar
$ export PATH="`pwd`/foobar:$PATH"
$ gagagou
$ echo $?
0

Regards,

-- 
Anthony Ramine

Le 5 juil. 2013 à 15:03, Matwey V. Kornilov a écrit :

> 
> Hi,
> 
> It seems that character ':' (colon) is not escaped in ERL_LIBS, this way it is impossible to add path consisting of colons to ERL_LIBS variable.
> 
> Please, see [1] for details, the following construction won't work as expected:
> 
> ERL_LIBS="/home/user/c\:dir/elixir/lib" erl -s elixir start_cli
> 
> Comment: 'c:dir' is the name of directory
> 
> [1] https://github.com/elixir-lang/elixir/issues/1375#issuecomment-20510270
> 
> _______________________________________________
> erlang-bugs mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-bugs



More information about the erlang-bugs mailing list