From a1a68c8c8819820b345bdc4350df80e239cd504c Mon Sep 17 00:00:00 2001 From: Nose Date: Thu, 22 Jan 2026 03:20:06 -0800 Subject: [PATCH] f --- scripts/bootstrap.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/bootstrap.py b/scripts/bootstrap.py index 97f0162..c8aa21f 100644 --- a/scripts/bootstrap.py +++ b/scripts/bootstrap.py @@ -884,7 +884,11 @@ def main() -> int: if script_path is not None: default_install = repo_root else: - default_install = Path.cwd() / "Medios-Macina" + # When piped, default to home folder on POSIX, CWD on Windows + if platform.system().lower() != "windows": + default_install = Path.home() / "medios" + else: + default_install = Path.cwd() / "Medios-Macina" print("\n[WEB INSTALLER MODE]") print(f"Current working directory: {Path.cwd()}") @@ -898,7 +902,9 @@ def main() -> int: if not install_dir_raw: install_path = default_install else: - install_path = Path(install_dir_raw).resolve() + # Resolve while expanding user paths (~) and environment variables ($HOME) + expanded = os.path.expandvars(os.path.expanduser(install_dir_raw)) + install_path = Path(expanded).resolve() except (EOFError, KeyboardInterrupt): return False