Skip to content

Commit

Permalink
Fix main require
Browse files Browse the repository at this point in the history
  • Loading branch information
creationix committed Apr 30, 2015
1 parent f6974dc commit d089885
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lua/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ local function zipBundle(base, zip)
end

local function buildBundle(target, bundle)
local miniz = require('miniz')
target = pathJoin(uv.cwd(), target)
print("Creating new binary: " .. target)
local fd = assert(uv.fs_open(target, "w", 511)) -- 0777
Expand Down Expand Up @@ -461,7 +460,7 @@ local function commonBundle(bundle, args, bundlePaths, mainPath)
end

if mainRequire then
return mainRequire(mainPath)
return mainRequire("./" .. mainPath)
else
local main = bundle.readfile(mainPath)
if not main then error("Missing " .. mainPath .. " in " .. bundle.base) end
Expand Down

0 comments on commit d089885

Please sign in to comment.