Skip to content

Commit

Permalink
fix(vscode): Codefixes for workspace file creation, dotnet installati…
Browse files Browse the repository at this point in the history
…on and designer refresh (#3818)

* fix(vscode): Add validation for workspace folder path as string (#3659) (#3779)

Validation for workspace folder path as string

* fix(vscode): Check list of files in dotnet binary installation (#3813)

Add decision for files is an array

* feat(vscode): Remove designer refresh and add window message (#3816)

Remove designer refresh and add window message
  • Loading branch information
ccastrotrejo authored Dec 11, 2023
1 parent fbd6e0f commit cc96054
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export async function createCodeless(
workspacePath = isString(workspacePath) ? workspacePath : undefined;
if (workspacePath === undefined) {
workspaceFolder = await getWorkspaceFolder(context);
workspacePath = workspaceFolder.uri.fsPath;
workspacePath = isString(workspaceFolder) ? workspaceFolder : workspaceFolder.uri.fsPath;
} else {
workspaceFolder = getContainingWorkspace(workspacePath);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,23 +126,12 @@ export default class OpenDesignerForLocalProject extends OpenDesignerBase {
this.panel.onDidChangeViewState(
async (event) => {
const eventPanel: WebviewPanel = event.webviewPanel;
this.panelMetadata = await this._getDesignerPanelMetadata(this.migrationOptions);
eventPanel.webview.html = await this.getWebviewContent({
connectionsData: this.panelMetadata.connectionsData,
parametersData: this.panelMetadata.parametersData || {},
localSettings: this.panelMetadata.localSettings,
artifacts: this.panelMetadata.artifacts,
azureDetails: this.panelMetadata.azureDetails,
workflowDetails: this.panelMetadata.workflowDetails,
});
this.sendMsgToWebview({
command: ExtensionCommand.update_panel_metadata,
data: {
panelMetadata: this.panelMetadata,
connectionData: this.connectionData,
apiHubServiceDetails: this.apiHubServiceDetails,
},
});
if (eventPanel.visible) {
window.showInformationMessage(
localize('designer.restart', 'If changes were made to logic app files, restart designer to see the latest changes.'),
'OK'
);
}
},
undefined,
ext.context.subscriptions
Expand Down
12 changes: 7 additions & 5 deletions apps/vs-code-designer/src/app/utils/dotnet/dotnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,13 @@ export async function getLocalDotNetVersionFromBinaries(): Promise<string> {

// First try to get sdk from Binary installation folder
const files = fs.existsSync(sdkVersionFolder) ? fs.readdirSync(sdkVersionFolder, { withFileTypes: true }) : null;
for (const file of files) {
if (file.isDirectory()) {
const version = file.name;
await executeCommand(ext.outputChannel, undefined, 'echo', 'Local binary .NET SDK version', version);
return version;
if (Array.isArray(files)) {
for (const file of files) {
if (file.isDirectory()) {
const version = file.name;
await executeCommand(ext.outputChannel, undefined, 'echo', 'Local binary .NET SDK version', version);
return version;
}
}
}

Expand Down

0 comments on commit cc96054

Please sign in to comment.