Skip to content

fix(manager/dockerfile): handle single-quoted empty ARG default value#44522

Open
youdie006 wants to merge 1 commit into
renovatebot:mainfrom
youdie006:fix/dockerfile-arg-single-quoted-empty
Open

fix(manager/dockerfile): handle single-quoted empty ARG default value#44522
youdie006 wants to merge 1 commit into
renovatebot:mainfrom
youdie006:fix/dockerfile-arg-single-quoted-empty

Conversation

@youdie006

Copy link
Copy Markdown

Closes #44497.

Renovate's Dockerfile ARG value unquoting only stripped double quotes, so ARG FOO='' kept the literal '' and FROM ${FOO}node:... resolved to ''node (which fails lookup). This extends the unquoting in lib/modules/manager/dockerfile/extract.ts to 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 value in extract.spec.ts using 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.

ARG value unquoting only stripped double quotes, so ARG FOO='' kept the
literal '' and resolved FROM ${FOO}node to ''node. Strip single quotes too.
@github-actions github-actions Bot requested a review from viceice July 13, 2026 05:16
@cla-assistant

cla-assistant Bot commented Jul 13, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cla-assistant

cla-assistant Bot commented Jul 13, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jamietanna jamietanna added the auto:pr-template "Please use PR template" label Jul 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there,
We notice that the Pull Request you've created doesn't quite follow our template.
Please update the PR description to follow our template.
This improves the maintainers' time to triage, as key information is clearly indicated in the format we expect.
Thanks, the Renovate team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto:pr-template "Please use PR template"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Renovate doesn't handle single-quoted empty value for Dockerfile's ARG

2 participants