You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by le...@apache.org on 2022/03/31 05:49:21 UTC
[apisix] branch release/2.10 updated: fix: `env.lua` should use absolute path (#6761)
This is an automated email from the ASF dual-hosted git repository.
leslie pushed a commit to branch release/2.10
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/release/2.10 by this push:
new 51e75c0 fix: `env.lua` should use absolute path (#6761)
51e75c0 is described below
commit 51e75c0100a85d209bb328b40a78d35ee4abc78f
Author: leslie <59...@users.noreply.github.com>
AuthorDate: Thu Mar 31 13:49:16 2022 +0800
fix: `env.lua` should use absolute path (#6761)
---
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 838ef63..79c004f 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"