Skip to content

Commit 85fc569

Browse files
Fix compilation errors in extension.ts
Co-authored-by: christianhelle <710400+christianhelle@users.noreply.github.com>
1 parent 46629b9 commit 85fc569

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/VSCode/src/extension.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -655,15 +655,16 @@ export function activate(context: vscode.ExtensionContext) {
655655
async (fileUri: vscode.Uri) => {
656656
if (!fileUri) {
657657
// If command was triggered from command palette, ask for file
658-
fileUri = await promptForFile(
658+
const selectedFileUri = await promptForFile(
659659
'**/*.{json,yaml,yml}',
660660
'Select a Swagger/OpenAPI specification file',
661661
'No Swagger/OpenAPI specification files found in the workspace'
662662
);
663663

664-
if (!fileUri) {
664+
if (!selectedFileUri) {
665665
return;
666666
}
667+
fileUri = selectedFileUri;
667668
}
668669

669670
executeRapicgen(generator.command, fileUri.fsPath, context);
@@ -680,15 +681,16 @@ export function activate(context: vscode.ExtensionContext) {
680681
async (fileUri: vscode.Uri) => {
681682
if (!fileUri) {
682683
// If command was triggered from command palette, ask for file
683-
fileUri = await promptForFile(
684+
const selectedFileUri = await promptForFile(
684685
'**/*.{json,yaml,yml}',
685686
'Select a Swagger/OpenAPI specification file',
686687
'No Swagger/OpenAPI specification files found in the workspace'
687688
);
688689

689-
if (!fileUri) {
690+
if (!selectedFileUri) {
690691
return;
691692
}
693+
fileUri = selectedFileUri;
692694
}
693695

694696
executeRapicgenTypeScript(generator.command, fileUri.fsPath, context);
@@ -704,15 +706,16 @@ export function activate(context: vscode.ExtensionContext) {
704706
async (fileUri: vscode.Uri) => {
705707
if (!fileUri) {
706708
// If command was triggered from command palette, ask for file
707-
fileUri = await promptForFile(
709+
const selectedFileUri = await promptForFile(
708710
'**/*.refitter',
709711
'Select a .refitter settings file',
710712
'No .refitter settings files found in the workspace'
711713
);
712714

713-
if (!fileUri) {
715+
if (!selectedFileUri) {
714716
return;
715717
}
718+
fileUri = selectedFileUri;
716719
}
717720

718721
executeRapicgenRefitterSettings(fileUri.fsPath, context);

0 commit comments

Comments
 (0)