-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potential load conflicts with other Lua libraries on the system.
No longer include the default paths in the lua load paths. This ensures we load our dependencies in isolation of any other lua libraries that might be installed on the same system. See: #250
- Loading branch information
Showing
2 changed files
with
23 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,4 @@ | ||
#!/usr/bin/env luajit | ||
|
||
local embedded_root = os.getenv("API_UMBRELLA_EMBEDDED_ROOT") | ||
if embedded_root then | ||
package.path = | ||
embedded_root .. "/apps/core/shared/vendor/share/lua/5.1/?.lua;" .. | ||
embedded_root .. "/apps/core/shared/vendor/share/lua/5.1/?/init.lua;" .. | ||
embedded_root .. "/openresty/lualib/?.lua;" .. | ||
embedded_root .. "/openresty/lualib/?/init.lua;" .. | ||
embedded_root .. "/openresty/luajit/share/luajit-2.1.0-beta1/?.lua;" .. | ||
embedded_root .. "/openresty/luajit/share/luajit-2.1.0-beta1/?/init.lua;" .. | ||
embedded_root .. "/openresty/luajit/share/lua/5.1/?.lua;" .. | ||
embedded_root .. "/openresty/luajit/share/lua/5.1/?/init.lua;" .. | ||
package.path | ||
package.cpath = | ||
embedded_root .. "/apps/core/shared/vendor/lib/lua/5.1/?.so;" .. | ||
embedded_root .. "/openresty/lualib/?.so;" .. | ||
embedded_root .. "/openresty/luajit/lib/lua/5.1/?.so;" .. | ||
package.cpath | ||
end | ||
|
||
local src_root = os.getenv("API_UMBRELLA_SRC_ROOT") | ||
if src_root then | ||
package.path = src_root .. "/src/?.lua;" .. package.path | ||
end | ||
|
||
local cli = require "api-umbrella.cli" | ||
cli() |