File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -791,7 +791,7 @@ export class WebSocketTerminalProfileProvider implements vscode.TerminalProfileP
791
791
// Get the terminal configuration. Will throw if there's an error.
792
792
const terminalOpts = terminalConfigForUri ( new AtelierAPI ( uri ) , uri , true ) ;
793
793
return new vscode . TerminalProfile ( terminalOpts ) ;
794
- } else {
794
+ } else if ( uri == undefined ) {
795
795
throw new Error (
796
796
"Lite Terminal requires an active server connection to InterSystems IRIS version 2023.2 or above."
797
797
) ;
Original file line number Diff line number Diff line change @@ -782,6 +782,8 @@ interface ConnQPItem extends vscode.QuickPickItem {
782
782
* connection, that will be returned without prompting the user.
783
783
*
784
784
* @param minVersion Optional minimum server version to enforce, in semantic version form (20XX.Y.Z).
785
+ * @returns `undefined` if there were no suitable server connections and `null` if the
786
+ * user explicitly escaped from the QuickPick.
785
787
*/
786
788
export async function getWsServerConnection ( minVersion ?: string ) : Promise < vscode . Uri > {
787
789
if ( ! vscode . workspace . workspaceFolders ?. length ) return ;
@@ -811,7 +813,7 @@ export async function getWsServerConnection(minVersion?: string): Promise<vscode
811
813
matchOnDetail : true ,
812
814
title : "Pick a server connection from the current workspace" ,
813
815
} )
814
- . then ( ( c ) => c ?. uri ) ;
816
+ . then ( ( c ) => c ?. uri ?? null ) ;
815
817
}
816
818
817
819
// ---------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments