Yiyiyimu commented on a change in pull request #2346:
URL: https://github.com/apache/apisix/pull/2346#discussion_r497227404



##########
File path: bin/apisix
##########
@@ -998,19 +998,19 @@ local function init_etcd(show_output)
         local errmsg = string.format("got malformed version message: \"%s\" 
from etcd", res)
         local body, _, err = dkjson.decode(res)
         if err then
-            io.stderr:write(errmsg)
+            error(errmsg)
             return
         end
 
         local cluster_version = body["etcdcluster"]
         if not cluster_version then
-            io.stderr:write(errmsg)
+            error(errmsg)
             return
         end
 
         if compare_semantic_version(cluster_version, min_etcd_version) then
-            io.stderr:write("etcd cluster version ", cluster_version,

Review comment:
       thank you for the suggestion, but simply output is error is very likely 
to be overlooked, like in #2342. 
   Replace `error` with `write`+`exit`, to not expose the traceback




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