I have a program, setting package.path to package.path .. ";anotherPath/?.lua". I think the problem is because of the shell:


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