Skip to content

DL3021: Fix behavior with quotes in target path#750

Merged
m-ildefons merged 1 commit intohadolint:masterfrom
m-ildefons:dl3021-fix-quotes
Dec 21, 2021
Merged

DL3021: Fix behavior with quotes in target path#750
m-ildefons merged 1 commit intohadolint:masterfrom
m-ildefons:dl3021-fix-quotes

Conversation

@m-ildefons
Copy link
Copy Markdown
Member

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