From 24c08d6ee09d717dcfe7a8a2bd3745c06cd35213 Mon Sep 17 00:00:00 2001 From: Nikhil Rao Date: Wed, 26 Apr 2023 08:26:02 -0700 Subject: [PATCH] Fix bun issue on Windows (#881) * Fix bun issue on Windows * Fix check --- pynecone/utils/prerequisites.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pynecone/utils/prerequisites.py b/pynecone/utils/prerequisites.py index 77772093a..6ef8bf465 100644 --- a/pynecone/utils/prerequisites.py +++ b/pynecone/utils/prerequisites.py @@ -211,8 +211,8 @@ def install_bun(): """Install bun onto the user's system. Raises: - Exit: If the bun version is not supported. FileNotFoundError: If the required packages are not installed. + Exit: If the bun version is not supported. """ bun_version = get_bun_version() if bun_version is not None and bun_version in constants.INVALID_BUN_VERSIONS: @@ -220,8 +220,8 @@ def install_bun(): f"""[red]Bun version {bun_version} is not supported by Pynecone. Please change your to bun version to be between {constants.MIN_BUN_VERSION} and {constants.MAX_BUN_VERSION}.""" ) console.print( - f"""[red]Upgrade by running the following command:[/red] - + f"""[red]Upgrade by running the following command:[/red] + curl -fsSL https://bun.sh/install | bash -s -- bun-v{constants.MAX_BUN_VERSION} """ @@ -231,7 +231,7 @@ curl -fsSL https://bun.sh/install | bash -s -- bun-v{constants.MAX_BUN_VERSION} # Bun is not supported on Windows. if platform.system() == "Windows": console.log("Skipping bun installation on Windows.") - raise typer.Exit() + return # Only install if bun is not already installed. if not os.path.exists(get_package_manager()):