fgerlits commented on code in PR #1681:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1681#discussion_r1487979767


##########
bootstrap/py_bootstrap.sh:
##########


Review Comment:
   To accomodate users who don't read instructions, we should first check if 
`python` and `python-venv` are installed, and tell the user to install them if 
they aren't.
   
   Also, if `python` is installed but `python-venv` isn't, the script creates a 
broken `venv` directory, so it won't work even after `python-venv` is installed 
later.  The `venv` directory should be removed (or not created) in this case.



##########
bootstrap/cli.py:
##########


Review Comment:
   After a step has finished in `Step by step` mode, is it possible to return 
to the `Step by step` menu instead of the main menu?



##########
bootstrap/package_manager.py:
##########
@@ -0,0 +1,259 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+import os
+import platform
+import subprocess
+import sys
+from typing import Dict, Set
+
+from distro import distro
+
+
+def _query_yes_no(question: str, no_confirm: bool) -> bool:
+    valid = {"yes": True, "y": True, "ye": True, "no": False, "n": False}
+
+    if no_confirm:
+        print("Running {} with noconfirm".format(question))
+        return True
+    while True:
+        print("{} [y/n]".format(question))

Review Comment:
   prompts requiring a response should be printed without a newline:
   ```suggestion
           print("{} [y/n]".format(question), end=' ', flush=True)
   ```



-- 
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: issues-unsubscr...@nifi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to