Skip to content

Commit

Permalink
app: Fix for MacOS auth plugins
Browse files Browse the repository at this point in the history
On at least MacOS, GUI apps do not take on the shell paths.
However they are needed for kubectl auth plugins,
and perhaps other binaries like minikube

Fixes #1885

Signed-off-by: René Dudfield <[email protected]>
  • Loading branch information
illume committed Apr 13, 2024
1 parent 201ea78 commit 5aa2173
Show file tree
Hide file tree
Showing 3 changed files with 143 additions and 29 deletions.
6 changes: 6 additions & 0 deletions app/electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { app, BrowserWindow, dialog, ipcMain, Menu, MenuItem, screen, shell } fr
import { IpcMainEvent, MenuItemConstructorOptions } from 'electron/main';
import log from 'electron-log';
import find_process from 'find-process';
import fixPath from 'fix-path';
import fs from 'fs';
import open from 'open';
import path from 'path';
Expand All @@ -16,6 +17,11 @@ import windowSize from './windowSize';

dotenv.config({ path: path.join(process.resourcesPath, '.env') });

// On at least MacOS, GUI apps do not take on the shell paths.
// However they are needed for kubectl auth plugins,
// and perhaps other binaries like minikube
fixPath();

const args = yargs
.command('$0 [kubeconfig]', '', yargs => {
yargs
Expand Down
165 changes: 136 additions & 29 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@
"electron-log": "^4.4.1",
"electron-wix-msi": "^4.0.0",
"find-process": "^1.4.7",
"fix-path": "^4.0.0",
"i18next": "^20.6.1",
"i18next-fs-backend": "^2.1.1",
"mkdirp": "^1.0.4",
Expand Down

0 comments on commit 5aa2173

Please sign in to comment.