diff --git a/ui/desktop/app/components/session/tabs/index.js b/ui/desktop/app/components/session/tabs/index.js index e52e1f13d..7ef617fbc 100644 --- a/ui/desktop/app/components/session/tabs/index.js +++ b/ui/desktop/app/components/session/tabs/index.js @@ -69,10 +69,14 @@ export default class SessionTerminalTabsComponent extends Component { const { isWindows } = await this.ipc.invoke('checkOS'); const { model } = this.args; - // Don't send the command on windows as most users won't have an openSSH client installed - if (model.target?.isSSH && !isWindows) { - const { proxy_address, proxy_port } = model; + const { proxy_address, proxy_port, started_desktop_client, target } = model; + // Only send the command on certain scenarios: + // 1. Only for SSH targets + // 2. Don't connect for windows as most users won't have an openSSH client installed + // 3. Don't connect if the session wasn't initiated in the desktop client + // which means we won't have proxy information + if (target?.isSSH && started_desktop_client && !isWindows) { // Send an SSH command immediately window.terminal.send( `ssh ${proxy_address} -p ${proxy_port} -o NoHostAuthenticationForLocalhost=yes\r`, diff --git a/ui/desktop/electron-app/src/cli/path.js b/ui/desktop/electron-app/src/cli/path.js index f37b6e9e3..4612a7716 100644 --- a/ui/desktop/electron-app/src/cli/path.js +++ b/ui/desktop/electron-app/src/cli/path.js @@ -5,11 +5,16 @@ const path = require('path'); const { isWindows } = require('../helpers/platform.js'); +const isDev = require('electron-is-dev'); module.exports = { // Returns boundary cli path path: () => { const name = isWindows() ? 'boundary.exe' : 'boundary'; - return path.resolve(process.resourcesPath, 'cli', name); + + // The CLI will be located in a different location once packaged up in an ASAR + return isDev + ? path.resolve(__dirname, '..', '..', 'cli', name) + : path.resolve(process.resourcesPath, 'cli', name); }, };