This commit is contained in:
2026-01-22 03:35:16 -08:00
parent bdea87a1bc
commit 4c69f43ac2
2 changed files with 11 additions and 4 deletions

View File

@@ -1141,7 +1141,7 @@ def main() -> int:
# This ensures it uses the same environment that started the bootstrap.
# Pass sys.stdin to ensure the subprocess can talk to the terminal.
subprocess.check_call(
[sys.executable, str(hydrus_script), "--no-project-venv"],
[sys.executable, str(hydrus_script), "--no-project-venv", "--interactive"],
env=env,
stdin=sys.stdin
)

View File

@@ -221,8 +221,6 @@ def update_medios_config(hydrus_path: Path) -> bool:
logging.error("Failed to update config.conf: %s", e)
return False
return False
logging.debug("Failed to update MM config: %s", e)
return False
def download_and_extract_zip(
@@ -908,6 +906,11 @@ def main(argv: Optional[list[str]] = None) -> int:
help="Force using the project venv even when running interactively",
)
parser.add_argument("--verbose", "-v", action="store_true", help="Verbose logging")
parser.add_argument(
"--interactive",
action="store_true",
help="Force interactive setup even if root/name are provided or no TTY is detected",
)
args = parser.parse_args(argv)
@@ -917,13 +920,17 @@ def main(argv: Optional[list[str]] = None) -> int:
# Interactive setup for root and name if not provided and in a TTY
# We check sys.argv directly to see if the flags were explicitly passed.
interactive_setup = False
if sys.stdin.isatty() and not any(arg in sys.argv for arg in ["--root", "-r", "--dest-name", "-d"]):
wants_interactive = args.interactive or (
sys.stdin.isatty() and not any(arg in sys.argv for arg in ["--root", "-r", "--dest-name", "-d"])
)
if wants_interactive:
print("\nHydrusNetwork Setup")
print("--------------------")
# Ask for root path
default_root = Path.cwd()
try:
print(f"Current directory: {default_root}")
root_input = input(f"Enter root directory for Hydrus installation [default: {default_root}]: ").strip()
if root_input:
# If they typed "C:" or similar, assume they want the root "C:\"