Merge pull request #1249 from WorldofBay/patch-2

do not clear _isIncludingExternal in nested calls
This commit is contained in:
Samuel Surtees 2019-02-24 21:44:46 +10:00 committed by GitHub
commit 4639116959
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,10 +82,11 @@
function includeexternal(fname)
local fullPath = p.findProjectScript(fname)
local wasIncludingExternal = api._isIncludingExternal
api._isIncludingExternal = true
fname = fullPath or fname
dofile(fname)
api._isIncludingExternal = nil
api._isIncludingExternal = wasIncludingExternal
end
p.alias(_G, "includeexternal", "includeExternal")