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

Allow binary files to be copied into the build context #250

Merged
merged 2 commits into from
Nov 17, 2023

Conversation

agyoungs
Copy link
Contributor

The current write routine will not work if the data is a bytes type. This can happen if the get_files function reads in a file using the b mode (appropriate if it's a binary file).

This change simply checks if the data is a bytes class and sets the write mode accordingly

@agyoungs agyoungs requested a review from tfoote as a code owner November 13, 2023 20:46
Copy link
Collaborator

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good. It would be great to have a quick unit test before merging to make sure there's not a regression in the future. I'll go over this once more when I'm back in the office next week.

@agyoungs
Copy link
Contributor Author

Thanks, this looks good. It would be great to have a quick unit test before merging to make sure there's not a regression in the future. I'll go over this once more when I'm back in the office next week.

I've now added another file for the file writing test that should cover this.

Copy link
Collaborator

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

Thanks for adding the test.

@tfoote tfoote merged commit 41a2269 into osrf:main Nov 17, 2023
2 checks passed
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