Skip to content

Fix case where \ at EOF made the builder ignore the command#27873

Merged
lowenna merged 1 commit intomoby:masterfrom
duglin:fixContChar
Nov 3, 2016
Merged

Fix case where \ at EOF made the builder ignore the command#27873
lowenna merged 1 commit intomoby:masterfrom
duglin:fixContChar

Conversation

@duglin
Copy link
Copy Markdown
Contributor

@duglin duglin commented Oct 29, 2016

Came from looking at issue #27545

In a Dockerfile with something like:

FROM ubuntu
RUN echo hi \

The \ at the end of the last line would cause the parser to totally ignore the last line - not good.

Signed-off-by: Doug Davis [email protected]

@duglin
Copy link
Copy Markdown
Contributor Author

duglin commented Oct 29, 2016

ping @MichaelSimons - just FYI, I didn't forget about how you noticed this issue

Comment thread builder/dockerfile/parser/parser.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

good comment. I was wondering where true was used.

@duglin duglin changed the title Fix case where \\ at EOF made the builder ignore the command Fix case where \ at EOF made the builder ignore the command Oct 29, 2016
@justincormack
Copy link
Copy Markdown
Contributor

Can we have a test for this so we know what the intended behaviour is please, they are alas the main documentation of the quirks of Dockerfile parsing.

@duglin
Copy link
Copy Markdown
Contributor Author

duglin commented Oct 29, 2016

@justincormack I did add a few tests, I'm not sure what you're looking for.

@lowenna
Copy link
Copy Markdown
Member

lowenna commented Oct 29, 2016

LGTM. Thanks @duglin - I've got one more bug in the builder too I'm tracking down as a result of that issue. Windows specific though.

@justincormack
Copy link
Copy Markdown
Contributor

@duglin thanks LGTM. Needs a rebase though.

Came from looking at issue moby#27545

Signed-off-by: Doug Davis <[email protected]>
@duglin
Copy link
Copy Markdown
Contributor Author

duglin commented Nov 3, 2016

rebased

@lowenna lowenna merged commit ecf405b into moby:master Nov 3, 2016
@duglin duglin deleted the fixContChar branch November 11, 2016 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants