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

install.sh: support compactified JSON from GitHub API. #18

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

cfallin
Copy link
Member

@cfallin cfallin commented Nov 2, 2023

In bytecodealliance/wasmtime#7377, we saw a case where a user gets compactified (single-line) JSON responses from the GitHub API. The install.sh logic to get the latest Wasmtime release version currently does text-munging that assumes a multiline (pretty-printed) JSON layout. This PR instead uses tr and sed to get the version number from either input format (thanks to @bjorn3 for the exact invocations!).

Fixes bytecodealliance/wasmtime#7377.

@cfallin cfallin requested a review from alexcrichton November 2, 2023 18:58
@alexcrichton
Copy link
Member

I think CI may indicate that there's another version of the script which needs updating, the built version I presume

In bytecodealliance/wasmtime#7377, we saw a case where a user gets
compactified (single-line) JSON responses from the GitHub API. The
`install.sh` logic to get the latest Wasmtime release version currently
does text-munging that assumes a multiline (pretty-printed) JSON layout.
This PR instead uses `tr` and `sed` to get the version number from
either input format (thanks to @bjorn3 for the exact invocations!).

Fixes bytecodealliance/wasmtime#7377.
@cfallin cfallin force-pushed the install-sh-compact-json branch from 778004a to 56bdb8d Compare November 2, 2023 19:05
@cfallin cfallin merged commit 5b70309 into bytecodealliance:gh-pages Nov 2, 2023
1 check passed
@cfallin cfallin deleted the install-sh-compact-json branch November 2, 2023 19:13
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.

curl install broken
2 participants