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

Remove getRawValue() function from Argument #10

Closed
rcjsuen opened this issue Dec 20, 2017 · 0 comments
Closed

Remove getRawValue() function from Argument #10

rcjsuen opened this issue Dec 20, 2017 · 0 comments
Assignees
Labels

Comments

@rcjsuen
Copy link
Owner

rcjsuen commented Dec 20, 2017

From some testing, I discovered that argument.getRawValue() did not function as expected if an argument spanned multiple lines but had a comment nested within said multiple lines.

RUN echo ab\
#comment
cd

Given the above Dockerfile, calling getRawValue() on the second argument would producing the following value:

ab\
#comment
cd

While it is technically correct, this result is of little value to clients as it forces clients to parse out the embedded comment themselves. Even if there was no embedded comment, getRawValue() would still return a value with the escape character and a newline character thrown inside of it.

As this library is intended to relieve clients of the need to perform any kind of parsing work, getRawValue() will be removed to make the API simpler to use. In the event that a client wishes to inspect the raw value, it can still be indirectly retrieved by first calling getRange() to get the range the argument encompasses and to then extract the string content within that range from the Dockerfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant