Skip to content

Commit

Permalink
Download API using WSL curl instead of windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dadmobile committed Apr 1, 2024
1 parent 2861286 commit 6e794bc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 };
Expand Down

0 comments on commit 6e794bc

Please sign in to comment.