Skip to content

Conversation

@chawyehsu
Copy link
Member

@chawyehsu chawyehsu commented Apr 30, 2024

Description

Catch error of parsing invalid manifest

before:

MethodInvocationException: <path_to_scoop>\apps\scoop\current\libexec\scoop-search.ps1:64
Line |
  64 |          $json = [System.Text.Json.JsonDocument]::Parse([System.IO.Fil|          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Exception calling "Parse" with "1" argument(s): "The input does not contain any JSON tokens.
     | Expected the input to start with a valid JSON token, when isFinalBlock is true. LineNumber: 0 |
     | BytePositionInLine: 0."

after:

No error thrown, also the invalid manifest can be troubleshooted when turning on debug mode.

Motivation and Context

Closes #XXXX

Relates to #XXXX

How Has This Been Tested?

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

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