membphis commented on a change in pull request #1236: Adding warning message 
when running APISIX in root path
URL: https://github.com/apache/incubator-apisix/pull/1236#discussion_r392630774
 
 

 ##########
 File path: bin/apisix
 ##########
 @@ -41,13 +41,18 @@ local pkg_path  = apisix_home .. 
"/deps/share/lua/5.1/apisix/lua/?.lua;"
                   .. apisix_home .. "/deps/share/lua/5.1/?.lua;;"
 
 -- only for developer, use current folder as working space
+local is_root_path = false
 local script_path = arg[0]
 if script_path:sub(1, 2) == './' then
     apisix_home = trim(excute_cmd("pwd"))
     if not apisix_home then
         error("failed to fetch current path")
     end
 
+    if string.match(apisix_home, '^/[root][^/]+') then
 
 Review comment:
   we should use `string.find`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to