Skip to content

Commit c3f953d

Browse files
LevevTibixDev
andauthored
fix: Add default homebrew bin directory to process.env.PATH (#506)
Co-authored-by: Tibix <fuloptibi03@gmail.com>
1 parent 8eb44ef commit c3f953d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/renderer/lib/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const path: typeof import("path") = require("node:path");
33

44
// Should be {home}/.winboat
55
export const WINBOAT_DIR = path.join(os.homedir(), ".winboat");
6+
export const DEFAULT_HOMEBREW_DIR = path.join(os.homedir(), "../linuxbrew/.linuxbrew/bin");
67

78
export const WINDOWS_VERSIONS = {
89
"11": "Windows 11 Pro",

src/renderer/main.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,19 @@ import { router } from "./router";
44
import { MotionPlugin } from "@vueuse/motion";
55
import "./index.css";
66
import { autoScroll } from "./directives/autoscroll";
7+
import { DEFAULT_HOMEBREW_DIR } from "./lib/constants";
78
import VueApexCharts from "vue3-apexcharts";
89

10+
const process: typeof import("process") = require("node:process");
11+
12+
/**
13+
* @note A big chunk of our userbase uses WinBoat under an immutable distro through GearLever.
14+
* In case it's the flatpak version of GearLever, PATH, and some other environment variable will get stripped by default.
15+
* We include the default homebrew bin directiory for exactly this reason.
16+
* It's not WinBoat's responsibility if the PATH envvar is incomplete, but in this case it affects a lot of users.
17+
*/
18+
process.env.PATH && (process.env.PATH += `:${DEFAULT_HOMEBREW_DIR}`);
19+
920
createApp(App)
1021
.directive("auto-scroll", autoScroll)
1122
.use(router)

0 commit comments

Comments
 (0)