Skip to content

Commit

Permalink
Fix symlink deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Yamashi committed Oct 2, 2021
1 parent f21c0b2 commit a2e38e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/scripting/Sandbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Sandbox::Sandbox(Scripting* apScripting, sol::environment aBaseEnvironment, cons
, m_env(apScripting->GetState().Get(), sol::create)
, m_path(acRootPath)
{
if (is_symlink(m_path / "init.lua"))
m_path = read_symlink(m_path / "init.lua").parent_path();

// copy base environment, do not set it as fallback, as it may cause globals to bleed into other things!
sol::state_view sv = apScripting->GetState().Get();
for (const auto& cKV : aBaseEnvironment)
Expand Down

0 comments on commit a2e38e3

Please sign in to comment.