refactor: use cliExists rather than cliPath

This commit is contained in:
Randall Morey committed 2021-02-02 11:34:02 -05:00
1 parent ee3b6db3d5
commit c40068f211
3 files changed
+3 -12

No files matched your search

@@ -49,11 +49,9 @@ export default class ScopesScopeProjectsTargetsRoute extends Route {
@action
async connect(model) {
try {
//eslint-disable-next-line no-debugger
debugger;
// Check for cli
const cliPath = await this.ipc.invoke('cliExists');
if(!cliPath) throw new Error('Cannot find boundary cli.')
// Check for CLI
const cliExists = await this.ipc.invoke('cliExists');
if (!cliExists) throw new Error('Cannot find Boundary CLI.');
// Create target session
const connectionDetails = await this.ipc.invoke('connect', {
@@ -4,8 +4,6 @@ const { spawnAsyncJSONPromise } = require('./spawn-promise');
const cliPath = async () => path.resolve(__dirname, '..', 'cli', 'boundary');
module.exports = {
// Find boundary cli path
path: () => cliPath(),
// Check boundary cli existence
exists: () => Boolean(cliPath()),
// Initiate connection and return output
-5
View File
@@ -22,11 +22,6 @@ handle('setOrigin', async (requestOrigin) => {
*/
handle('cliExists', () => boundaryCli.exists());
/**
* Detect boundary cli path
*/
handle('cliPath', () => boundaryCli.path());
/**
* Establishes a boundary session and returns session details.
*/