Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: env.lua should use absolute path #6758

Merged
merged 1 commit into from
Mar 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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