Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

chore: initialize workspace properly if git repository does not contain .vscode/extensions.json #1352

Merged
merged 1 commit into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ export class CheTheiaPluginsDevfileResolver implements DevfileResolver {
cheTheiaPluginsYamlContent = devfileContext.devfile.attributes?.['.che/che-theia-plugins.yaml'];
}

// no content, skip
// no content
if (!cheTheiaPluginsYamlContent && !vscodeExtensionJsonContent) {
// we have to update the workspace anyway, but without extensions
await this.devWorkspaceUpdater.update(devfileContext, [], [], { extensions: [] });
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ describe('Test CheTheiaPluginsDevfileResolver', () => {
expect(cheTheiaPluginSidecarMergerMergeSpy).toBeCalledTimes(0);
expect(cheTheiaPluginDevContainerMergerMergeSpy).toBeCalledTimes(0);

// no update
expect(devWorkspaceUpdaterUpdateMethod).toBeCalledTimes(0);
// devWorkspace should be updated
expect(devWorkspaceUpdaterUpdateMethod).toBeCalledTimes(1);
});
});