Posted 20 April 2018 - 10:09 AM
I have a program, setting package.path to package.path .. ";anotherPath/?.lua". I think the problem is because of the shell:
package.path is set to default: "?;?.lua;?/init.lua" and will override after each shell.run()
Is there any nice workaround with shell.run?
Sewbacca
local function createShellEnv( sDir )
local tEnv = {}
tEnv[ "shell" ] = shell
tEnv[ "multishell" ] = multishell
local package = {}
package.loaded = {
_G = _G,
bit32 = bit32,
coroutine = coroutine,
math = math,
package = package,
string = string,
table = table,
}
package.path = "?;?.lua;?/init.lua" -- <<<< This line
package.path is set to default: "?;?.lua;?/init.lua" and will override after each shell.run()
Is there any nice workaround with shell.run?
Sewbacca
Edited on 20 April 2018 - 10:49 AM