diff options
author | Andreas Fidjeland <andreas@fidjeland.io> | 2014-02-24 18:50:28 +0400 |
---|---|---|
committer | Andreas Fidjeland <andreas@fidjeland.io> | 2014-02-24 18:50:28 +0400 |
commit | 23608098586e8ccfc0292df382ff797b39c1990e (patch) | |
tree | 8cde9294ac3d6518ed45fcef6628f66ebd2e517e | |
parent | 459ec7c8ec749fd1b744aac7a3a643a34389d370 (diff) |
Changed the path and cpath order
This undoes manipulation of the path/cpath performed by dok at
require-time.
-rw-r--r-- | init.lua | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -280,6 +280,8 @@ if paths.dirp(localinstalldir) then package.cpath = paths.concat(localinstalldir,'lib','lua','5.1','?.dylib') .. ';' .. package.cpath end +local origpath = package.path +local origcpath = package.cpath function loaddefaultlibs(loadwithimport) if loadwithimport == nil then loadwithimport = false end @@ -298,6 +300,10 @@ end local loadwithimport = false loaddefaultlibs(loadwithimport) +-- undo path manipulation performed by dok +package.path = origpath +package.cpath = origcpath + _G._preloaded_ = {} for k,v in pairs(_G) do _G._preloaded_[k] = true |