f
This commit is contained in:
@@ -883,6 +883,10 @@ def main() -> int:
|
|||||||
# because that's just CWD.
|
# because that's just CWD.
|
||||||
if script_path is not None:
|
if script_path is not None:
|
||||||
default_install = repo_root
|
default_install = repo_root
|
||||||
|
else:
|
||||||
|
# When piped, default to home folder on POSIX, CWD on Windows
|
||||||
|
if platform.system().lower() != "windows":
|
||||||
|
default_install = Path.home() / "medios"
|
||||||
else:
|
else:
|
||||||
default_install = Path.cwd() / "Medios-Macina"
|
default_install = Path.cwd() / "Medios-Macina"
|
||||||
|
|
||||||
@@ -898,7 +902,9 @@ def main() -> int:
|
|||||||
if not install_dir_raw:
|
if not install_dir_raw:
|
||||||
install_path = default_install
|
install_path = default_install
|
||||||
else:
|
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):
|
except (EOFError, KeyboardInterrupt):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user