Skip to content

Commit

Permalink
download-plugins: fix logging of failures
Browse files Browse the repository at this point in the history
Because Array.forEach(f) calls f with (currentValue, index, array), the output
was not only the messages, but also the index and full array.

Signed-off-by: Jérome Perrin <perrinjerome@gmail.com>
  • Loading branch information
perrinjerome committed Dec 3, 2020
1 parent e616c94 commit ea6c180
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 @@ -83,7 +83,7 @@ export default async function downloadPlugins(options: DownloadPluginsOptions =
} finally {
temp.cleanupSync();
}
failures.forEach(console.error);
failures.forEach(e => { console.error(e); });
if (!ignoreErrors && failures.length > 0) {
throw new Error('Errors downloading some plugins. To make these errors non fatal, re-run with --ignore-errors');
}
Expand Down

0 comments on commit ea6c180

Please sign in to comment.