divijvaidya commented on code in PR #14636:
URL: https://github.com/apache/kafka/pull/14636#discussion_r1372147994
##########
release.py:
##########
@@ -491,6 +491,25 @@ def command_release_announcement_email():
Do you have all of of these setup? (y/n): """ % (PREFS_FILE, json.dumps(prefs,
indent=2))):
fail("Please try again once you have all the prerequisites ready.")
+apache_id = sanitize_input("Please enter your apache-id: ")
+
+print("Begin to check if you have met all the pre-requisites for the release
process")
+test_maven = cmd_output("mvn -v")
+if "Apache Maven" in test_maven:
+ print("Pre-requisite met: You have maven cli in place")
+else:
+ fail("Pre-requisite not met: You need to install maven CLI")
Review Comment:
I tested it and it did not fail so nicely for me :)
```
Do you have all of of these setup? (y/n): y
Please enter your apache-id: divijv
Begin to check if you have met all the pre-requisites for the release process
Traceback (most recent call last):
File "/opt/kafka/./release.py", line 497, in <module>
test_maven = cmd_output("mvn -v")
File "/opt/kafka/./release.py", line 140, in cmd_output
return subprocess.check_output(cmd, *args, stderr=subprocess.STDOUT,
**kwargs).decode('utf-8')
File "/usr/lib64/python3.9/subprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib64/python3.9/subprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib64/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib64/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'mvn'
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]