You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/03/15 00:36:03 UTC

[GitHub] [incubator-apisix] membphis commented on a change in pull request #1236: Adding warning message when running APISIX in root path

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:
users@infra.apache.org


With regards,
Apache Git Services