From 6e794bc59bfb6528016abad3121ffbf83d939504 Mon Sep 17 00:00:00 2001
From: Tony Salomone <dadmobile@gmail.com>
Date: Mon, 1 Apr 2024 17:08:01 -0400
Subject: [PATCH] Download API using WSL curl instead of windows

---
 src/main/util.ts | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main/util.ts b/src/main/util.ts
index c46404e6..6a7746a5 100644
--- a/src/main/util.ts
+++ b/src/main/util.ts
@@ -81,7 +81,7 @@ export async function checkForMissingSystemRequirements() {
       // Everything checks out OK!
       return false;
 
-    // Currently nothing to check for on other platforms  
+    // Currently nothing to check for on other platforms
     default:
       return false;
   }
@@ -194,9 +194,10 @@ export async function installLocalServer() {
   // We can download the API in one line for linux/mac
   // but it's a little more complicated for windows, so call a bat file
   console.log("Platform:" + process.platform);
+  const download_cmd = `curl https://raw.githubusercontent.com/transformerlab/transformerlab-api/main/install.sh | bash -s -- download_transformer_lab`;
   const installScriptCommand = isPlatformWindows()
-      ? `download_windows_api.bat`
-      : `curl https://raw.githubusercontent.com/transformerlab/transformerlab-api/main/install.sh | bash -s -- download_transformer_lab`;
+      ? `wsl ` + download_cmd
+      : download_cmd;
   const options = isPlatformWindows()
       ? {}
       : { shell: '/bin/bash', cwd: root_dir };
-- 
GitLab