Skip to content

Commit

Permalink
add only the directory of the gcloud command to the path
Browse files Browse the repository at this point in the history
on the UI in the tooltip we tell the user to enter the output of the
`whereis gcloud` command, but it ends with the gcloud command itself,
while we only need its directory
-
Ticket: AUT-2324
  • Loading branch information
hawser86 committed Oct 23, 2023
1 parent 45b7861 commit 11dcc16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { app, BrowserWindow, ipcMain, Menu, MenuItem } from 'electron';
import log from 'electron-log';
import path from 'path';
import { dirname } from 'node:path';
import { startWatchingForUpdates } from './auto-updater/auto-updater';
import { postFeedbackToGoogleForm } from './feedback/feedback';
import { SettingsStore } from './settings-store/settings-store';
Expand Down Expand Up @@ -100,7 +101,7 @@ const addSettingsCommandToDefaultMenus = () => {

const addGoogleCloudSdkExecutablesToPATH = () => {
if (process.platform === 'darwin') {
const gcloudPathFromSettings = settingsStore.load().gcloudPath;
const gcloudPathFromSettings = dirname(settingsStore.load().gcloudPath);
const possibleGcloudPaths = gcloudPathFromSettings
? [gcloudPathFromSettings]
: [
Expand Down

0 comments on commit 11dcc16

Please sign in to comment.