package.moonpath
is never updated which breaks Moonscript module requirements
#719
Labels
package.moonpath
is never updated which breaks Moonscript module requirements
#719
If you create a Moonscript spec file, the spec itself works fine. With that said, if you attempt to require a Moonscript file from inside the spec file, it doesn't take into account the value of either the command flag
-m
/--lpath
, or the cooresponding.busted
keyvalue.When trying to diagnose the issue with @leafo, we came to the conclusion that busted is initializing the Moonscript loader before modifying
package.path
. As Moonscript is initialized with the older value, it needs to be updated to take into account the other search paths set by busted. Failing to do this meanspackage.moonpath
defaults to whatever is assigned to the environment variableLUA_PATH
, which is unexpected behavior.For demonstration, you can throw this in a Moonscript spec file and compare:
spec/moon_spec.moon
:Output
The text was updated successfully, but these errors were encountered: