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

When there is no Node.js installed, the style is not assigned, therefore the symbol is displayed with no colour #4705

Closed
scottwillmoore opened this issue Dec 11, 2022 · 1 comment · Fixed by #4713
Labels
🐛 bug Something isn't working as expected. 🌱 good first issue Good first issue to get your feet wet.

Comments

@scottwillmoore
Copy link

Bug Report

Current Behavior

The nodejs module ignores the style property when there is no Node.js installed, and therefore the the symbol is displayed with no colour.

Case: There is no Node.js installed.
No style is applied.

Case: There is a Node.js installed, and no engines property in the package.json.
Case: There is a Node.js installed and it matches the engines property in the package.json.
The value of style is used from the configuration.

Case: There is a Node.js installed and it does not match the engines property in the package.json.
The value of not_capable_style is used from the configuration.

Expected Behavior

When there is no Node.js installed, the value of style should still be used from the configuration, and therefore the symbol is still displayed with colour.

Case: There is no Node.js installed.
The value of style is used from the configuration.

Possible Solution

I'm not entirely certain, but the only path I could see that lead to the style variable not being set correctly occurs on line 48 of the nodejs module. In the case that nodejs_version.deref().as_ref()? fails, then I don't believe the style variable gets assigned.

@scottwillmoore scottwillmoore added the 🐛 bug Something isn't working as expected. label Dec 11, 2022
@davidkna davidkna added the 🌱 good first issue Good first issue to get your feet wet. label Dec 11, 2022
@Andree37
Copy link
Contributor

Working on this quick and will release a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working as expected. 🌱 good first issue Good first issue to get your feet wet.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants