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

DL3021: Fix behavior with quotes in target path #750

Merged
merged 1 commit into from Dec 21, 2021

Conversation

m-ildefons
Copy link
Collaborator

DL3021 makes sure the target path is a directory by making sure it ends
with a / if there are more than two arguments to a COPY instruction.
This should work regardless of whether or not that target path is
quoted.

fixes: #749

How to verify it

This should no longer erroneously trigger DL3021:

COPY fileA fileB fileC "/var/lib/destination/"

DL3021 makes sure the target path is a directory by making sure it ends
with a `/` if there are more than two arguments to a `COPY` instruction.
This should work regardless of whether or not that target path is
quoted.

fixes: hadolint#749
@m-ildefons m-ildefons merged commit d16f342 into hadolint:master Dec 21, 2021
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.

False positive DL3021
2 participants