Hi,<div><br></div><div>There's something with the options passed to the emulator within an escript file that I don't get to work properly. The problem is:</div><div><br></div><div>If I add paths which contains glob expressions to the code path with -pa argument in the escript file, this paths don't get added. Example:</div>
<div><br></div><div><div>#!/usr/bin/env escript</div><div>%%! -pa ebin deps/*/ebin</div><div><br></div><div>%</div><div>% Escript file to exemplify my problem</div><div>%</div><div><br></div><div>main(_) -></div><div>
lists:foreach(fun(E) -></div>
<div> io:format("Path ~s ~n", [E])</div><div> end, code:get_path()).</div></div><div><br></div><div>When I execute this escript, this is the output:</div><div><br></div><div><div>[madtrick@fuquet { auth } (mock_auth_service *%) ruby-1.9.2-p290 ]</div>
<div>>> ./ecript </div><div>Path ebin </div><div>Path . </div><div>Path /usr/lib/erlang/lib/kernel-2.15/ebin </div><div>Path /usr/lib/erlang/lib/stdlib-1.18/ebin </div><div>Path /usr/lib/erlang/lib/xmerl-1.3/ebin </div>
<div>Path /usr/lib/erlang/lib/wx-0.99.1/ebin </div><div>Path /usr/lib/erlang/lib/webtool-0.8.9.1/ebin </div><div>Path /usr/lib/erlang/lib/typer-0.9.3/ebin </div><div>Path /usr/lib/erlang/lib/tv-2.1.4.8/ebin </div><div>Path /usr/lib/erlang/lib/tools-2.6.6.6/ebin </div>
<div>... % output deleted</div><div><br></div><div>As you can see, the ebin/ paths under deps/ don't get added to the code path.</div><div><br></div><div>But, If I execute the emulator directly and use the same arguments those paths get added:</div>
<div><br></div><div><div>[madtrick@fuquet { auth } (mock_auth_service *%) ruby-1.9.2-p290 ]</div><div>>>erl -pa ebin deps/*/ebin</div><div>Erlang R15B (erts-5.9) [source] [64-bit] [smp:2:2] [async-threads:0] [hipe] [kernel-poll:false]</div>
<div><br></div><div>Eshell V5.9 (abort with ^G)</div><div>1> lists:foreach(fun(E) -> io:format("Path ~s ~n", [E]) end, code:get_path()).</div><div>Path deps/reloader/ebin </div><div>Path deps/rabbit_common/ebin </div>
<div>Path deps/proper/ebin </div><div>Path deps/piqi_src/ebin </div><div>Path deps/piqi/ebin </div><div>Path deps/meck/ebin </div><div>Path deps/jiffy/ebin </div><div>Path deps/hamcrest/ebin </div><div>Path deps/espec/ebin </div>
<div>Path deps/coello/ebin </div><div>Path deps/amqp_client/ebin </div><div>Path ebin </div><div>Path . </div><div>Path /usr/lib/erlang/lib/kernel-2.15/ebin </div><div>Path /usr/lib/erlang/lib/stdlib-1.18/ebin </div><div>
Path /usr/lib/erlang/lib/xmerl-1.3/ebin </div><div>Path /usr/lib/erlang/lib/wx-0.99.1/ebin </div><div>Path /usr/lib/erlang/lib/webtool-0.8.9.1/ebin </div><div>Path /usr/lib/erlang/lib/typer-0.9.3/ebin </div><div>Path /usr/lib/erlang/lib/tv-2.1.4.8/ebin </div>
<div>... %output deleted</div><div><br></div><div>As you can see, the ebin/ paths under deps/ get added.</div></div><div><br></div><div>Any ideas?</div><div><br></div></div><div>Thanks. Farruco Sanjurjo</div>