Skip to content

Commit

Permalink
fix: env.lua should use absolute path (#6758)
Browse files Browse the repository at this point in the history
  • Loading branch information
leslie-tsang authored and spacewander committed May 29, 2022
1 parent 3d5fea4 commit 4fb1b7a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apisix/cli/env.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 4fb1b7a

Please sign in to comment.