Skip to content

Commit

Permalink
John's suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-bsaviano committed Jan 24, 2025
1 parent c7858a2 commit 6d0ddd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/webSocketTerminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ export class WebSocketTerminalProfileProvider implements vscode.TerminalProfileP
// Get the terminal configuration. Will throw if there's an error.
const terminalOpts = terminalConfigForUri(new AtelierAPI(uri), uri, true);
return new vscode.TerminalProfile(terminalOpts);
} else {
} else if (uri == undefined) {
throw new Error(
"Lite Terminal requires an active server connection to InterSystems IRIS version 2023.2 or above."
);
Expand Down
4 changes: 3 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,8 @@ interface ConnQPItem extends vscode.QuickPickItem {
* connection, that will be returned without prompting the user.
*
* @param minVersion Optional minimum server version to enforce, in semantic version form (20XX.Y.Z).
* @returns `undefined` if there were no suitable server connections and `null` if the
* user explicitly escaped from the QuickPick.
*/
export async function getWsServerConnection(minVersion?: string): Promise<vscode.Uri> {
if (!vscode.workspace.workspaceFolders?.length) return;
Expand Down Expand Up @@ -811,7 +813,7 @@ export async function getWsServerConnection(minVersion?: string): Promise<vscode
matchOnDetail: true,
title: "Pick a server connection from the current workspace",
})
.then((c) => c?.uri);
.then((c) => c?.uri ?? null);
}

// ---------------------------------------------------------------------
Expand Down

0 comments on commit 6d0ddd2

Please sign in to comment.