diff --git a/apisix/cli/env.lua b/apisix/cli/env.lua index 39422088d098..cf4ffd6af07b 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"