Skip to content

Commit ae0f008

Browse files
committed
Get stored password correctly for new-style isfs authority
1 parent 53b28fb commit ae0f008

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/utils/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ export function connectionTarget(uri?: vscode.Uri): ConnectionTarget {
167167
}
168168
} else if (schemas.includes(uri.scheme)) {
169169
result.apiTarget = uri;
170-
result.configName = uri.authority;
170+
const parts = uri.authority.split(":");
171+
result.configName = parts.length === 2 ? parts[0] : uri.authority;
171172
}
172173
}
173174

@@ -178,7 +179,8 @@ export function connectionTarget(uri?: vscode.Uri): ConnectionTarget {
178179
? vscode.workspace.workspaceFolders[0]
179180
: undefined;
180181
if (firstFolder && schemas.includes(firstFolder.uri.scheme)) {
181-
result.configName = firstFolder.uri.authority;
182+
const parts = firstFolder.uri.authority.split(":");
183+
result.configName = parts.length === 2 ? parts[0] : firstFolder.uri.authority;
182184
result.apiTarget = firstFolder.uri;
183185
} else {
184186
result.configName = workspaceState.get<string>("workspaceFolder") || firstFolder ? firstFolder.name : "";

0 commit comments

Comments
 (0)