fgerlits commented on code in PR #9429:
URL: https://github.com/apache/nifi/pull/9429#discussion_r1816518525


##########
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:
   This unit test has value: it loads the ExtensionManager class, so if there 
are e.g. syntax errors, they get caught earlier; and it validates the change in 
the PR in the sense that if you run the test with the ExtensionManager code on 
`main`, it will fail: we are now calling `pip install` once instead of twice.
   
   I have renamed and refactored it to make it clearer that this is just a unit 
test for a single method in the ExtensionManager class, and also to make it 
easier to add unit tests for the rest of the methods later.



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

Reply via email to