[erlang-bugs] Colons in ERL_LIBS

Dave Cottlehuber dch@REDACTED
Sun Jul 7 22:15:49 CEST 2013


On Friday, July 5, 2013, Anthony Ramine wrote:

> Hello Matwey,
>
> Character `:` is a path delimiter. Bash itself does not understand paths
> containing `:` in `$PATH`. You should not use paths containing a colon.
>
>
That's OS dependent. You can do that on Windows, OSX, possibly VMS too but
my memory fails me. I'd say this is a bug as c:\ is pretty much std on
windows.

As a workaround, IIRC windows erlang accepts relative paths, and /
windows/system32 for example will be considered as relative to the root
drive of the current working dir. Other alternatives include ntfs junction
points.


> $ 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
> > erlang-bugs@REDACTED <javascript:;>
> > http://erlang.org/mailman/listinfo/erlang-bugs
>
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED <javascript:;>
> http://erlang.org/mailman/listinfo/erlang-bugs
>


-- 
Sent from my PDP11
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20130707/b9709f17/attachment.htm>


More information about the erlang-bugs mailing list