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

Commit

Permalink
chore: devWorkspace should be initialized properly if there is no plu…
Browse files Browse the repository at this point in the history
…gins/extensions provided

Signed-off-by: Vitaliy Gulyy <[email protected]>
  • Loading branch information
Vitaliy Gulyy committed Jun 8, 2022
1 parent e60a2df commit 17abbf1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
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);
});
});

0 comments on commit 17abbf1

Please sign in to comment.