Skip to content

Commit d57e287

Browse files
vince-fugnittoRomanNikitenko
authored andcommitted
cli: support downloading .theia plugins
The commit updates the `download-plugins` script to allow the downloading of `.theia` (theia-plugins). Previously, the download would fail if an application references a `.theia` file as it was an unsupported file extension. Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
1 parent 83917e5 commit d57e287

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dev-packages/cli/src/download-plugins.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ async function downloadPluginAsync(failures: string[], plugin: string, pluginUrl
162162
fileExt = '.tar.gz';
163163
} else if (pluginUrl.endsWith('vsix')) {
164164
fileExt = '.vsix';
165+
} else if (pluginUrl.endsWith('theia')) {
166+
fileExt = '.theia'; // theia plugins.
165167
} else {
166168
failures.push(red(`error: '${plugin}' has an unsupported file type: '${pluginUrl}'`));
167169
return;
@@ -210,7 +212,7 @@ async function downloadPluginAsync(failures: string[], plugin: string, pluginUrl
210212
return;
211213
}
212214

213-
if (fileExt === '.vsix' && packed === true) {
215+
if ((fileExt === '.vsix' || fileExt === '.theia') && packed === true) {
214216
// Download .vsix without decompressing.
215217
const file = createWriteStream(targetPath);
216218
await pipelineAsPromised(response.body, file);

0 commit comments

Comments
 (0)