Skip to content

Commit

Permalink
download-plugins: report a failure in case of unsupported file type
Browse files Browse the repository at this point in the history
If a plugin url listed in theiaPlugins in package.json is not supported,
it should be reported as a failure and not only logged.

Signed-off-by: Jérome Perrin <[email protected]>
  • Loading branch information
perrinjerome committed Dec 7, 2020
1 parent 763d3ba commit 395dbbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dev-packages/cli/src/download-plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ async function downloadPluginAsync(failures: string[], plugin: string, pluginUrl
} else if (pluginUrl.endsWith('vsix')) {
fileExt = '.vsix';
} else {
console.error(red(`error: '${plugin}' has an unsupported file type: '${pluginUrl}'`));
failures.push(red(`error: '${plugin}' has an unsupported file type: '${pluginUrl}'`));
return;
}
const targetPath = path.join(process.cwd(), pluginsDir, `${plugin}${packed === true ? fileExt : ''}`);
Expand Down

0 comments on commit 395dbbb

Please sign in to comment.