SQL Bindings refactor password prompting (#19371)

* remove password enter manually - since we prompt user to include it prior

* go back to connection profile prompt

* add manual entry if connection info password is not saved

* add tests that verify all password prompt scenarios

* nit
This commit is contained in:
Vasu Bhog
2022-05-19 10:41:11 -07:00
committed by GitHub
parent dbaa78a737
commit 9cefed840e
4 changed files with 193 additions and 25 deletions

View File

@@ -119,7 +119,13 @@ export async function createAzureFunction(node?: ITreeNodeInfo): Promise<void> {
telemetryStep = CreateAzureFunctionStep.launchFromCommandPalette;
// prompt user for connection profile to get connection info
while (true) {
connectionInfo = await vscodeMssqlApi.promptForConnection(true);
try {
connectionInfo = await vscodeMssqlApi.promptForConnection(true);
} catch (e) {
// user cancelled while creating connection profile
// show the connection profile selection prompt again
continue;
}
if (!connectionInfo) {
// User cancelled
return;