Skip to content

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.
@oreflow oreflow requested a review from a team as a code owner December 30, 2025 13:45
@oreflow
Copy link
Collaborator

oreflow commented Dec 30, 2025

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to enable multiline commands in command files for buildozer, similar to how they are handled on the command line. The change involves modifying appendCommandsFromReader to read subsequent lines if a line ends with a continuation character (\). While the intention is good and new tests have been added, the implementation of the line continuation check in edit/buildozer.go appears to be incorrect and will not work as intended with the provided test cases.

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