Kaynağa Gözat

Fix bun issue on Windows (#881)

* Fix bun issue on Windows

* Fix check
Nikhil Rao 2 yıl önce
ebeveyn
işleme
24c08d6ee0
1 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  1. 4 4
      pynecone/utils/prerequisites.py

+ 4 - 4
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()):