spacewander commented on a change in pull request #3220:
URL: https://github.com/apache/apisix/pull/3220#discussion_r553802247
##########
File path: Makefile
##########
@@ -83,7 +83,10 @@ init: default
### run: Start the apisix server
.PHONY: run
run: default
-ifeq ("$(wildcard logs/nginx.pid)", "")
+ifeq ("$(findstring /root, ${PWD})", "/root")
+ @echo "Non-zero exit status: 1"
Review comment:
I mean to exit the Makefile with non-zero exit code.
##########
File path: Makefile
##########
@@ -83,7 +83,10 @@ init: default
### run: Start the apisix server
.PHONY: run
run: default
-ifeq ("$(wildcard logs/nginx.pid)", "")
+ifeq ("$(findstring /root, ${PWD})", "/root")
+ @echo "Non-zero exit status: 1"
Review comment:
I mean to exit the `make run` with non-zero exit code.
##########
File path: Makefile
##########
@@ -84,8 +84,8 @@ init: default
.PHONY: run
run: default
ifeq ("$(findstring /root, ${PWD})", "/root")
- @echo "Non-zero exit status: 1"
- @echo "Error, It is forbidden to run APISIX in the /root directory."
+ @echo "Error: It is forbidden to run APISIX in the /root directory."
+ @exit 1
Review comment:
We need to add a test for it.
##########
File path: Makefile
##########
@@ -84,8 +84,8 @@ init: default
.PHONY: run
run: default
ifeq ("$(findstring /root, ${PWD})", "/root")
- @echo "Non-zero exit status: 1"
- @echo "Error, It is forbidden to run APISIX in the /root directory."
+ @echo "Error: It is forbidden to run APISIX in the /root directory."
+ @exit 1
Review comment:
See
https://github.com/apache/apisix/blob/ebd158a8583306183533e92cb87d39854b0af42a/.travis/apisix_cli_test/test_main.sh#L920
----------------------------------------------------------------
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]