Skip to content

DL3014: Fix false positive on double quiet#913

Merged
lorenzo merged 1 commit intohadolint:masterfrom
m-ildefons:dl3014-fix-double-quiet
Jan 30, 2023
Merged

DL3014: Fix false positive on double quiet#913
lorenzo merged 1 commit intohadolint:masterfrom
m-ildefons:dl3014-fix-double-quiet

Conversation

@m-ildefons
Copy link
Copy Markdown
Member

apt-get can take the --quiet or -q argument to increase its quietness level. At the maximum of 2, this will also imply assume-yes i.e. the -y flag. Therefore if the necessary quietness level has been configured by command line parameters, DL3014 should not alert the user to the missing -y flag.

fixes: #911

Signed-off-by: Moritz Röhrich moritz.rohrich@suse.com

How to verify it

Unittests are included. In any case, the following Dockerfile should no longer produce warning DL3014:

FROM debian:stable-slim
RUN apt-get update && apt-get install --quiet --quiet sl

`apt-get` can take the `--quiet` or `-q` argument to increase its
quietness level. At the maximum of 2, this will also imply `assume-yes`
i.e. the `-y` flag. Therefore if the necessary quietness level has been
configured by command line parameters, DL3014 should not alert the user
to the missing `-y` flag.

fixes: hadolint#911

Signed-off-by: Moritz Röhrich <moritz.rohrich@suse.com>
@lorenzo
Copy link
Copy Markdown
Member

lorenzo commented Jan 30, 2023

thanks!

@lorenzo lorenzo merged commit 80d0187 into hadolint:master Jan 30, 2023
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.

Dont throw DL3014 when using "apt-get --quiet --quiet"

2 participants