fix: add the brew the path on Linux

This commit is contained in:
Amin Yahyaabadi 2022-11-20 20:54:17 -08:00
parent 3ba3a1b365
commit f9582b64f0
5 changed files with 12 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,7 @@ import { tmpdir } from "os"
import path, { join } from "path" import path, { join } from "path"
import { mkdirP } from "@actions/io" import { mkdirP } from "@actions/io"
import { readFileSync } from "fs" import { readFileSync } from "fs"
import { addPath } from "../utils/env/addEnv"
let binDir: string | undefined let binDir: string | undefined
@ -44,7 +45,13 @@ export async function setupBrew(_version: string, _setupDir: string, _arch: stri
NONINTERACTIVE: "1", NONINTERACTIVE: "1",
}, },
}) })
binDir = "/usr/local/bin/"
if (process.platform === "linux") {
binDir = "/home/linuxbrew/.linuxbrew/bin/"
await addPath(binDir)
} else {
binDir = "/usr/local/bin/"
}
return { binDir } return { binDir }
} }