This commit is contained in:
2026-01-11 11:11:32 -08:00
parent 234f7aca5c
commit fa9f765089
2 changed files with 65 additions and 22 deletions

View File

@@ -806,6 +806,29 @@ def main(argv: Optional[list[str]] = None) -> int:
if args.verbose:
logging.getLogger().setLevel(logging.DEBUG)
# 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.
if sys.stdin.isatty() and not any(arg in sys.argv for arg in ["--root", "-r", "--dest-name", "-d"]):
print("\nHydrusNetwork Setup")
print("--------------------")
# Ask for root path
default_root = Path.home()
try:
root_input = input(f"Enter root directory for Hydrus installation [default: {default_root}]: ").strip()
if root_input:
args.root = root_input
else:
args.root = str(default_root)
# Ask for destination folder name
dest_input = input(f"Enter folder name for Hydrus [default: hydrusnetwork]: ").strip()
if dest_input:
args.dest_name = dest_input
except (EOFError, KeyboardInterrupt):
print("\nSetup cancelled.")
return 0
root = Path(args.root).expanduser().resolve()
# Python executable inside the repo venv (set when we create/find the venv)
venv_py = None