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

Commit 7444312

Browse files
committed
fix: clear command when entrypoint is tweaked
Signed-off-by: David Kwon <dakwon@redhat.com>
1 parent 39511b7 commit 7444312

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

tools/devworkspace-handler/src/devfile/dev-container-component-updater.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export class DevContainerComponentUpdater {
9393

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

9798
// now, need to add the common stuff
9899
this.containerPluginRemoteUpdater.update(devContainerComponent.name, devContainer);

tools/devworkspace-handler/tests/devfile/dev-container-component-updater.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ describe('Test DevContainerComponentUpdater', () => {
7878
path: '/existing',
7979
},
8080
],
81+
command: [ 'tail' ],
8182
},
8283
};
8384
devContainerComponentFinderFindMethod.mockResolvedValue(devContainerComponent);
@@ -138,6 +139,7 @@ describe('Test DevContainerComponentUpdater', () => {
138139
]);
139140
// args updated
140141
expect(devContainerComponent?.container?.args).toStrictEqual(['sh', '-c', '${PLUGIN_REMOTE_ENDPOINT_EXECUTABLE}']);
142+
expect(devContainerComponent?.container?.command).toEqual([]);
141143

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

0 commit comments

Comments
 (0)