Skip to content

[vcpkg_from_github] Fix parse error on OSX#20650

Merged
vicroms merged 1 commit intomicrosoft:masterfrom
JackBoosY:dev/jack/20644
Oct 13, 2021
Merged

[vcpkg_from_github] Fix parse error on OSX#20650
vicroms merged 1 commit intomicrosoft:masterfrom
JackBoosY:dev/jack/20644

Conversation

@JackBoosY
Copy link
Contributor

@JackBoosY JackBoosY commented Oct 11, 2021

When using --head, the github server will return the following json:

  {

    "ref": "refs/heads/master",
    "node_id": "MDM6UmVmMjg2MzkwOTpyZWZzL2hlYWRzL21hc3Rlcg==",
    "url": "https://api.github.com/repos/mosra/corrade/git/refs/heads/master",
    "object": {
      "sha": "bb626d650c7d76dd2846945ef22e9eb0003b6ea9",
      "type": "commit",
      "url": "https://api.github.com/repos/mosra/corrade/git/commits/bb626d650c7d76dd2846945ef22e9eb0003b6ea9"
    }

  }

There is a space after "sha":, causing the parsing to fail:

CMake Error at scripts/cmake/vcpkg_from_github.cmake:164 (message):
  Failed to parse API response from '':

So add parsing zero or more spaces after the :.

Fixes #20644.

@JackBoosY JackBoosY added category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:internal labels Oct 11, 2021
@JackBoosY
Copy link
Contributor Author

Related PR: #19815

@JackBoosY JackBoosY requested a review from PhoebeHui October 12, 2021 05:54
@PhoebeHui PhoebeHui added the info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. label Oct 12, 2021
@vicroms vicroms merged commit b8c3999 into microsoft:master Oct 13, 2021
@JackBoosY JackBoosY deleted the dev/jack/20644 branch October 13, 2021 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:vcpkg-bug The issue is with the vcpkg system (including helper scripts in `scripts/cmake/`) info:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Corrade] build failure - Failed to parse API response

3 participants