Skip to content

Commit f9582b6

Browse files
committed
fix: add the brew the path on Linux
1 parent 3ba3a1b commit f9582b6

File tree

5 files changed

+12
-5
lines changed

5 files changed

+12
-5
lines changed

dist/node12/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node12/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node16/setup_cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/node16/setup_cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/brew/brew.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { tmpdir } from "os"
55
import path, { join } from "path"
66
import { mkdirP } from "@actions/io"
77
import { readFileSync } from "fs"
8+
import { addPath } from "../utils/env/addEnv"
89

910
let binDir: string | undefined
1011

@@ -44,7 +45,13 @@ export async function setupBrew(_version: string, _setupDir: string, _arch: stri
4445
NONINTERACTIVE: "1",
4546
},
4647
})
47-
binDir = "/usr/local/bin/"
48+
49+
if (process.platform === "linux") {
50+
binDir = "/home/linuxbrew/.linuxbrew/bin/"
51+
await addPath(binDir)
52+
} else {
53+
binDir = "/usr/local/bin/"
54+
}
4855

4956
return { binDir }
5057
}

0 commit comments

Comments
 (0)