Subject: bug#23943: Guile loads "init.scm" from the current directory

From: Alex Kost <[email-masked]>
Date: Tue, 12 Jul 2016 10:33:52 +0300

Andy Wingo (2016-07-11 19:07 +0300) wrote:

> On Mon 11 Jul 2016 09:44, Alex Kost <[email-masked]> writes:
>
>> cd /tmp
>> echo foo > init.scm
>> GUILE_LOAD_COMPILED_PATH= GUILE_LOAD_PATH= guile -q
>>
>> And it fails with this error:
>>
>>   guile: uncaught throw to unbound-variable: (#f Unbound variable: ~S (foo) #f)
>>   Cannot exit gracefully when init is in progress; aborting.
>>   Aborted (core dumped)
>>
>> I'm not sure I understand it right from the commentary in "init.c"[1],
>> but I think this behavior is not intended, or is it?
>>
>> [1] http://git.savannah.gnu.org/cgit/guile.git/tree/libguile/init.c#n238
>
> Your invocation does not unset GUILE_LOAD_PATH and
> GUILE_LOAD_COMPILED_PATH, but rather *sets* them to contain only one
> element, the current directory.  Use "unset" or similar to unset these
> variables.

Aha, now I see that "GUILE_LOAD_PATH= guile" adds "" (an empty string)
to %load-path.  Thanks for the answer!

-- 
Alex