You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/12/03 01:59:49 UTC

[GitHub] [apisix] spacewander commented on a change in pull request #5675: feat: support resolve default value when environment not set

spacewander commented on a change in pull request #5675:
URL: https://github.com/apache/apisix/pull/5675#discussion_r761596029



##########
File path: apisix/cli/file.lua
##########
@@ -65,8 +65,15 @@ local function resolve_conf_var(conf)
             local var_used = false
             -- we use '${{var}}' because '$var' and '${var}' are taken
             -- by Nginx
-            local new_val = val:gsub("%$%{%{%s*([%w_]+)%s*%}%}", function(var)
-                local v = getenv(var)
+            local new_val = val:gsub("%$%{%{%s*([%w_]+[%:%w+]*)%s*%}%}", function(var)

Review comment:
       Could you add a test in https://github.com/apache/apisix/blob/b8daf65b3c0690138feccb2ce399fc58349ac7ee/t/cli/test_main.sh#L311?
   Also need to update the doc in https://github.com/apache/apisix/blob/11433d740c5e19b757c61f59842d6de64e27fba8/conf/config.yaml#L24




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org