File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1515-- limitations under the License.
1616--
1717
18+ local ngx = ngx
1819local yaml = require (" lyaml" )
1920local profile = require (" apisix.core.profile" )
2021local util = require (" apisix.cli.util" )
@@ -293,7 +294,9 @@ function _M.read_yaml_conf(apisix_home)
293294 end
294295 end
295296
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
297300 local apisix_conf_path = profile :yaml_path (" apisix" )
298301 local apisix_conf_yaml , _ = util .read_file (apisix_conf_path )
299302 if apisix_conf_yaml then
You can’t perform that action at this time.
0 commit comments