You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by we...@apache.org on 2020/01/07 12:18:34 UTC
[incubator-apisix] branch master updated: bugfix: use current
folder as working space for developer. (#1030)
This is an automated email from the ASF dual-hosted git repository.
wenming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-apisix.git
The following commit(s) were added to refs/heads/master by this push:
new ab86830 bugfix: use current folder as working space for developer. (#1030)
ab86830 is described below
commit ab86830f0f909e9dcb68a4eeed7a8ff15f8e08ff
Author: YuanSheng Wang <me...@gmail.com>
AuthorDate: Tue Jan 7 20:18:25 2020 +0800
bugfix: use current folder as working space for developer. (#1030)
---
bin/apisix | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/bin/apisix b/bin/apisix
index b9de45b..5fae3ed 100755
--- a/bin/apisix
+++ b/bin/apisix
@@ -17,7 +17,7 @@
-- limitations under the License.
--
-local script_path = debug.getinfo(1).source:sub(2)
+local script_path = arg[0]
local function trim(s)
return (s:gsub("^%s*(.-)%s*$", "%1"))
@@ -38,18 +38,18 @@ end
excute_cmd("install -d -m 777 /tmp/apisix_cores/")
local apisix_home = "/usr/local/apisix"
-if script_path:sub(1, 17) == '/usr/local/apisix' or script_path:sub(1, 4) == '/bin' then
- package.cpath = "/usr/local/apisix/deps/lib64/lua/5.1/?.so;"
- .. "/usr/local/apisix/deps/lib/lua/5.1/?.so;"
- .. package.cpath
-
- package.path = "/usr/local/apisix/deps/share/lua/5.1/apisix/lua/?.lua;"
- .. "/usr/local/apisix/deps/share/lua/5.1/?.lua;"
- .. "/usr/share/lua/5.1/apisix/lua/?.lua;"
- .. "/usr/local/share/lua/5.1/apisix/lua/?.lua;"
- .. package.path
-
-else
+package.cpath = "/usr/local/apisix/deps/lib64/lua/5.1/?.so;"
+ .. "/usr/local/apisix/deps/lib/lua/5.1/?.so;"
+ .. package.cpath
+
+package.path = "/usr/local/apisix/deps/share/lua/5.1/apisix/lua/?.lua;"
+ .. "/usr/local/apisix/deps/share/lua/5.1/?.lua;"
+ .. "/usr/share/lua/5.1/apisix/lua/?.lua;"
+ .. "/usr/local/share/lua/5.1/apisix/lua/?.lua;"
+ .. package.path
+
+-- only for developer, use current folder as working space
+if script_path:sub(1, 2) == './' then
apisix_home = pwd
package.cpath = pwd .. "/deps/lib64/lua/5.1/?.so;"
.. package.cpath