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

feat(ops): use lua libs to backup config file insteadof shell command #7048

Merged
merged 7 commits into from
May 23, 2022
Prev Previous commit
Next Next commit
feat(ops): check certificate path with penlight.exist
Signed-off-by: kwanhur <huang_hua2012@163.com>
kwanhur committed May 15, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 592a75693130e0114ec2394d03e325866bb67a70
5 changes: 2 additions & 3 deletions apisix/cli/ops.lua
Original file line number Diff line number Diff line change
@@ -469,9 +469,8 @@ Please modify "admin_key" in conf/config.yaml .
-- Therefore we need to check the absolute version instead
cert_path = pl_path.abspath(cert_path)

local ok, err = util.is_file_exist(cert_path)
if not ok then
util.die(err, "\n")
if not pl_path.exists(cert_path) then
util.die("certificate path", cert_path, "isn't exist\n")
end

yaml_conf.apisix.ssl.ssl_trusted_certificate = cert_path