Skip to content

Commit 58870a0

Browse files
atomanticCopilot
andauthored
use path.join for BrewFile lookup
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent e27f75e commit 58870a0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ async function run() {
3636
}
3737

3838
// Check for .BrewFile in homedir
39-
const brewFileExists = fs.existsSync("./homedir/.BrewFile");
39+
const brewFileExists = fs.existsSync(path.join(__dirname, "homedir", ".BrewFile"));
4040
let brewFilePackages = [];
4141

4242
if (brewFileExists) {
43-
const brewFileContent = fs.readFileSync("./homedir/.BrewFile", "utf8");
43+
const brewFileContent = fs.readFileSync(path.join(__dirname, "homedir", ".BrewFile"), "utf8");
4444
brewFilePackages = brewFileContent
4545
.split("\n")
4646
.map(line => line.trim())

0 commit comments

Comments
 (0)