Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download-plugins: fix logging of failures #8798

Conversation

perrinjerome
Copy link
Contributor

What it does

Because Array.forEach(f) calls f with (currentValue, index, array), the output
was not only the messages, but also the index and full array.

This changes to log only the message.

How to test

Change theiaPlugins in package.json to something like this:

  "theiaPlugins": {
    "error-404": "https://open-vsx.org/404.vsix",
    "another-error": "https://open-vsx.org/404.vsix"
  }

run yarn download:plugins. Without this change, in the output there is the index and the array of failures, it looks like this:
image

After this change, the output is:

image

Review checklist

Reminder for reviewers

Copy link
Member

@paul-marechal paul-marechal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, LGTM.

@vince-fugnitto vince-fugnitto added builtins Issues related to VS Code builtin extensions theia-cli issues related to the theia-cli labels Nov 30, 2020
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>
@perrinjerome perrinjerome force-pushed the fix/logging-download-plugin-failures branch from 49fe3cf to ea6c180 Compare December 3, 2020 02:15
@perrinjerome
Copy link
Contributor Author

I rebased to solve conflicts, now that #8788 is merged

@vince-fugnitto vince-fugnitto merged commit e3e323e into eclipse-theia:master Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builtins Issues related to VS Code builtin extensions theia-cli issues related to the theia-cli
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants