Allow overriding lua binary in $PATH with Java system property LUA_COMMAND.

This commit is contained in:
Ian Farmer
2008-10-10 23:18:46 +00:00
parent feaf20174f
commit 79e25ac436

View File

@@ -94,7 +94,10 @@ public class ScriptDrivenTest extends TestCase {
InputStream script = new FileInputStream(file);
// }
try {
return collectProcessOutput(new String[] { "lua", "-" }, script);
String luaCommand = System.getProperty("LUA_COMMAND");
if ( luaCommand == null )
luaCommand = "lua";
return collectProcessOutput(new String[] { luaCommand, "-" }, script);
} finally {
script.close();
}