In this function, we should provide an error message for developers to understand WHY plugin installation failed.
|
async function download(url: string) { |
|
const data = await fetch(url, { method: 'GET' }) |
|
.then((res) => res.text()) |
|
.catch(() => null); |
|
|
|
if (!data) throw new Error('Download failed! Kindly contact developers'); |
|
|
|
return data; |
In this function, we should provide an error message for developers to understand WHY plugin installation failed.
cli/src/commands/plugins.ts
Lines 96 to 103 in 90fae47