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

[vcpkg_from_github] Fix parse error on OSX #20650

Merged
merged 1 commit into from Oct 13, 2021

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 This PR or Issue was filed by the vcpkg team. labels Oct 11, 2021
@JackBoosY
Copy link
Contributor Author

Related PR: #19815

@PhoebeHui PhoebeHui added the info:reviewed Pull Request changes follow basic guidelines 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:internal This PR or Issue was filed by the vcpkg team. info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Corrade] build failure - Failed to parse API response
3 participants