You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2022/03/31 03:45:31 UTC
[apisix] branch master updated: fix: `env.lua` should use absolute path (#6758)
This is an automated email from the ASF dual-hosted git repository.
spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new b454ceb fix: `env.lua` should use absolute path (#6758)
b454ceb is described below
commit b454ceb6ba303d646ef4bbf65be272d03932c52b
Author: leslie <59...@users.noreply.github.com>
AuthorDate: Thu Mar 31 11:45:25 2022 +0800
fix: `env.lua` should use absolute path (#6758)
---
apisix/cli/env.lua | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/apisix/cli/env.lua b/apisix/cli/env.lua
index 3942208..cf4ffd6 100644
--- a/apisix/cli/env.lua
+++ b/apisix/cli/env.lua
@@ -78,7 +78,14 @@ return function (apisix_home, pkg_cpath_org, pkg_path_org)
end
end
- local openresty_args = [[openresty -p ]] .. apisix_home .. [[ -c ]]
+ -- pre-transform openresty path
+ res, err = util.execute_cmd("command -v openresty")
+ if not res then
+ error("failed to exec ulimit cmd \'command -v openresty\', err: " .. err)
+ end
+ local openresty_path_abs = util.trim(res)
+
+ local openresty_args = openresty_path_abs .. [[ -p ]] .. apisix_home .. [[ -c ]]
.. apisix_home .. [[/conf/nginx.conf]]
local min_etcd_version = "3.4.0"