From 11dcc166fe181396fdb26d83a49112d979e2133c Mon Sep 17 00:00:00 2001 From: rgargya Date: Mon, 23 Oct 2023 22:12:27 +0200 Subject: [PATCH] add only the directory of the gcloud command to the path 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 --- src/main/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/index.js b/src/main/index.js index 2a22e38..99ec25f 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -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'; @@ -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] : [