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

fix: handle invalid manifest.json files in checkIncompatibleAddOns function #495

Merged
merged 4 commits into from
Nov 17, 2024

Conversation

Revyn112
Copy link
Contributor

@Revyn112 Revyn112 commented Nov 14, 2024

Fixes #[issue_no]

Summary of Changes

  • Error Handling for manifest.json Parsing:
    Added a try-catch block to handle cases where manifest.json is invalid or unreadable.
    Prevented the function from crashing due to syntax errors or unexpected tokens in manifest.json.

  • Logging Improvements:
    Implemented console.warn to log issues with specific manifest.json files for debugging purposes.

  • Resilience Enhancements:
    Ensured the function gracefully continues processing other directories even if a corrupt manifest.json is encountered.

These changes improve the reliability and robustness of the checkIncompatibleAddOns function.

Screenshots (if necessary)

Before:
grafik

After:
grafik

Additional context

Discord username (if different from GitHub):

@Revyn112 Revyn112 changed the title fix: handle invalid manifest.json files in findInInstallPath function fix: handle invalid manifest.json files in checkIncompatibleAddOns function Nov 14, 2024
@frankkopp
Copy link
Member

Great change - was looking at this just the other day as I also had an issue in my own Community folder that threw an error.

@frankkopp frankkopp merged commit 5d4e807 into flybywiresim:master Nov 17, 2024
3 checks passed
frankkopp pushed a commit that referenced this pull request Nov 17, 2024
…nction (#495)

* fix: check parsing for incorrect manifest.json of 3rd party addons

* fix: run lint

---------

Co-authored-by: Frank Kopp <[email protected]>
(cherry picked from commit 5d4e807)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants