membphis commented on a change in pull request #2101:
URL: https://github.com/apache/apisix/pull/2101#discussion_r555039722



##########
File path: apisix/cli/ops.lua
##########
@@ -390,6 +392,21 @@ local function start(env, ...)
         end
     end
 
+    local parser = argparse()
+    parser:argument("_", "Placeholder")
+    parser:option("-c --config", "location of customized config.yaml")
+    local args = parser:parse()
+    local customized_yaml = args["config"]
+
+    profile.apisix_home = env.apisix_home .. "/"
+    local local_conf_path = profile:yaml_path("config")
+
+    if customized_yaml then
+        execute("mv " .. local_conf_path .. " " .. local_conf_path .. ".bak")

Review comment:
       and we need the test cases about this step

##########
File path: apisix/cli/ops.lua
##########
@@ -390,6 +392,21 @@ local function start(env, ...)
         end
     end
 
+    local parser = argparse()
+    parser:argument("_", "Placeholder")
+    parser:option("-c --config", "location of customized config.yaml")
+    local args = parser:parse()
+    local customized_yaml = args["config"]
+
+    profile.apisix_home = env.apisix_home .. "/"
+    local local_conf_path = profile:yaml_path("config")
+
+    if customized_yaml then
+        execute("mv " .. local_conf_path .. " " .. local_conf_path .. ".bak")

Review comment:
       we need to revert the file `con/config.yaml.bak` when call `apisix stop`




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to