Skip to content

CXX-3008 replace invalid multiple Bash herestrings with output files #1155

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

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

eramongodb
Copy link
Contributor

Followup to #1154. Sorry, I fell for the multiple herestring trap again (which is not supported by Bash). 🤦

This PR falls back to the old tried-and-true output file method instead of using procsubs and herestrings. Verified (properly) by this patch.

@eramongodb eramongodb self-assigned this Jun 24, 2024
Copy link
Contributor

@vector-of-bool vector-of-bool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines 49 to 57
[[ -f old.json ]] || {
echo "missing old.json" 1>&2
exit 1
}

[[ -f new.json ]] || {
echo "missing new.json" 1>&2
exit 1
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it even possible for these files to not exist after the two shell redirects above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair. I suppose this is being a bit too defensive given diff will also error if the provided file doesn't exist. Will remove.

@eramongodb eramongodb merged commit dc6da28 into mongodb:master Jun 24, 2024
1 check was pending
@eramongodb eramongodb deleted the cxx-silk branch June 24, 2024 16:22
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