PR follow-up comments (#17113)

This commit is contained in:
Benjin Dubishar
2021-09-20 15:46:34 -07:00
committed by GitHub
parent dec5be6915
commit 5feb660234
3 changed files with 10 additions and 5 deletions

View File

@@ -840,7 +840,7 @@ export class ProjectsController {
}
const filters: { [name: string]: string[] } = {};
filters['OpenAPI/Swagger spec'] = ['yaml'];
filters[constants.specSelectionText] = ['yaml'];
let uris = await vscode.window.showOpenDialog({
canSelectFiles: true,
@@ -964,12 +964,16 @@ export class ProjectsController {
return project;
} catch (err) {
void vscode.window.showErrorMessage(`${constants.generatingProjectFailed}: ${utils.getErrorMessage(err)}`);
void vscode.window.showErrorMessage(constants.generatingProjectFailed(utils.getErrorMessage(err)));
return;
}
}
private findPostDeploymentScript(files: vscode.Uri[]): vscode.Uri | undefined {
// Locate the post-deployment script generated by autorest, if one exists.
// It's only generated if enums are present in spec, b/c the enum values need to be inserted into the generated table.
// Because autorest is executed via command rather than API, we can't easily "receive" the name of the script,
// so we're stuck just matching on a file name.
const results = files.filter(f => f.fsPath.endsWith(constants.autorestPostDeploymentScriptName));
switch (results.length) {