bugfix(CLI): fix wrong info Warning! Running apisix under /root when make init at non-root path (#1976)

This commit is contained in:
wonglend 2020-08-03 19:12:02 +08:00 committed by GitHub
parent 90867ed744
commit 4cbb324cca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ if script_path:sub(1, 2) == './' then
error("failed to fetch current path")
end
if string.match(apisix_home, '^/[root][^/]+') then
if string.match(apisix_home .. "/", '^/root/') then
is_root_path = true
end