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

Commit

Permalink
fix: clear command when entrypoint is tweaked
Browse files Browse the repository at this point in the history
Signed-off-by: David Kwon <[email protected]>
  • Loading branch information
dkwon17 committed May 2, 2022
1 parent 39511b7 commit 7444312
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export class DevContainerComponentUpdater {

// need to tweak the entrypoint to call the ${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}
devContainer.args = ['sh', '-c', '${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}'];
devContainer.command = [];

// now, need to add the common stuff
this.containerPluginRemoteUpdater.update(devContainerComponent.name, devContainer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ describe('Test DevContainerComponentUpdater', () => {
path: '/existing',
},
],
command: [ 'tail' ],
},
};
devContainerComponentFinderFindMethod.mockResolvedValue(devContainerComponent);
Expand Down Expand Up @@ -138,6 +139,7 @@ describe('Test DevContainerComponentUpdater', () => {
]);
// args updated
expect(devContainerComponent?.container?.args).toStrictEqual(['sh', '-c', '${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}']);
expect(devContainerComponent?.container?.command).toEqual([]);

// check we have a new volume added
const components = devfileContext.devWorkspace.spec?.template?.components || [];
Expand Down

0 comments on commit 7444312

Please sign in to comment.