fgerlits commented on code in PR #9429:
URL: https://github.com/apache/nifi/pull/9429#discussion_r1814613566
##########
mvnw:
##########
@@ -105,6 +106,21 @@ trim() {
printf "%s" "${1}" | tr -d '[:space:]'
}
+# find the Python executable
+if [ -z "${PYTHON_CMD-}" ]; then
+ for PYTHON_PATH in /usr/bin/python3 /usr/local/bin/python3 /usr/bin/python
/usr/local/bin/python; do
+ if [ -x "${PYTHON_PATH}" ]; then
+ export PYTHON_CMD="${PYTHON_PATH}"
+ break
+ fi
+ done
+
+ if [ -z "${PYTHON_CMD-}" ]; then
+ echo "Python executable not found; please set PYTHON_CMD" >&2
+ return 1
+ fi
+fi
Review Comment:
You are right, a unit test should not download stuff from the internet (and
take 20+ seconds). In e3ab1c7c53742fe22cddcc8384018e3a55e93f81, I have mocked
out the `subprocess.run` call, and now only test that it gets called once
instead of twice, as it used to be.
I also agree it would be a good idea to add an integration test which does
the package installations and version checks; can we do that separately, in
another pull request?
--
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]