We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98deae7 commit 485f04dCopy full SHA for 485f04d
apisix/cli/file.lua
@@ -15,6 +15,7 @@
15
-- limitations under the License.
16
--
17
18
+local ngx = ngx
19
local yaml = require("lyaml")
20
local profile = require("apisix.core.profile")
21
local util = require("apisix.cli.util")
@@ -293,7 +294,9 @@ function _M.read_yaml_conf(apisix_home)
293
294
end
295
296
- if default_conf.deployment.config_provider == "yaml" then
297
+ --- using `not ngx` to check whether the current execution environment is apisix cli module,
298
+ --- because it is only necessary to parse and validate `apisix.yaml` in apisix cli.
299
+ if default_conf.deployment.config_provider == "yaml" and not ngx then
300
local apisix_conf_path = profile:yaml_path("apisix")
301
local apisix_conf_yaml, _ = util.read_file(apisix_conf_path)
302
if apisix_conf_yaml then
0 commit comments