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

Trim trailing quotes from jq output #43

Merged
merged 2 commits into from
Oct 20, 2022
Merged

Conversation

WilliamVenner
Copy link
Contributor

Was breaking the build script

@WilliamVenner WilliamVenner requested a review from a team October 20, 2022 08:12
Co-authored-by: MaeIsBad <26093674+MaeIsBad@users.noreply.github.com>
@MaeIsBad
Copy link
Member

MaeIsBad commented Oct 20, 2022

I've just realized this might actually not work, because of the trailing newline. You might want to use -j instead of -r to make sure jq doesn't output a newline if that happens

@WilliamVenner
Copy link
Contributor Author

Seems to not have a trailing newline from what I can see:

william.venner@192 veil % yeah=$(curl "https://crates.io/api/v1/crates/veil-macros/0.1.3" -s | jq -r '.version .num')
william.venner@192 veil % echo "k $yeah k"                                                                           
k 0.1.3 k

@MaeIsBad
Copy link
Member

Right shell scripts are funky, sorry!

@WilliamVenner WilliamVenner merged commit 0a7ef85 into master Oct 20, 2022
@WilliamVenner WilliamVenner deleted the fix-build-script-again branch October 20, 2022 08:28
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