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

Enable buildozer commands containing newlines in command files. #1296

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kleerwater
Copy link
Contributor

buildozer can accept an argument for the set command with appropriately escaped newlines to force multiline values that would otherwise be written out as a single line. When buildozer reads commands from a commands file, it reads a single line and attempts to apply it as a command, so newlines can't be used to force a multiline value.

To enable forcing multiline values when using a commands file, this updates buildozer to continue reading lines when a line ends with an escaped newline to match the behavior on the command line. This additionally adds a test case for using whitespace on the command-line so that there is consistent coverage for the two modes.

buildozer can accept an argument for the set command with appropriately
escaped newlines to force multiline values that would otherwise be
written out as a single line. When buildozer reads commands from a
commands file, it reads a single line and attempts to apply it as a
command, so newlines can't be used to force a multiline value.

To enable forcing multiline values when using a commands file, this
updates buildozer to continue reading lines when a line ends with an
escaped newline to match the behavior on the command line. This
additionally adds a test case for using whitespace on the command-line
so that there is consistent coverage for the two modes.
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.

1 participant