fix(manager/dockerfile): handle single-quoted empty ARG default value#44522
Open
youdie006 wants to merge 1 commit into
Open
fix(manager/dockerfile): handle single-quoted empty ARG default value#44522youdie006 wants to merge 1 commit into
youdie006 wants to merge 1 commit into
Conversation
ARG value unquoting only stripped double quotes, so ARG FOO='' kept the
literal '' and resolved FROM ${FOO}node to ''node. Strip single quotes too.
|
|
Contributor
|
Hi there, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #44497.
Renovate's Dockerfile
ARGvalue unquoting only stripped double quotes, soARG FOO=''kept the literal''andFROM ${FOO}node:...resolved to''node(which fails lookup). This extends the unquoting inlib/modules/manager/dockerfile/extract.tsto strip single quotes the same way, so both''and""empty values yield an empty string.Test plan
Added
handles FROM with single-quoted empty ARG default valueinextract.spec.tsusing the issue's exact repro (ARG DOCKER_HUB_MIRROR=''). Red before the fix (depName: "''node"), green after. Full dockerfile manager suite: 82 passed; the changed lines are at 100% coverage; prettier / oxlint / biome clean.AI disclosure: this PR was drafted with Claude Code (AI-assisted). Tests were run red->green (82 passed) with coverage/lint verified.