Skip to content

feat: Support multiple --env-file options#2355

Merged
dannf merged 1 commit intochainguard-dev:mainfrom
dannf:multiple-env-files
Feb 18, 2026
Merged

feat: Support multiple --env-file options#2355
dannf merged 1 commit intochainguard-dev:mainfrom
dannf:multiple-env-files

Conversation

@dannf
Copy link
Contributor

@dannf dannf commented Feb 17, 2026

I need a way to inject more environment variables into the build.
melange supports a --env-file for specifying environment variables.
Wolfi builds already use this parameter to pass static, arch-specific
variables in. Specifying a second --env-file nullifies the first.
Let's allow multiple --env-file options, with each subsequent --env-file
overlaying values on top of the previous ones.

Note that if any users were relying on the previous behavior of subsequent
--env-file options nullifying all earlier ones, this would break that
use case.

Signed-off-by: dann frazier dann.frazier@chainguard.dev

@dannf dannf force-pushed the multiple-env-files branch from d9d3620 to 3816e41 Compare February 17, 2026 21:58
@dannf dannf marked this pull request as ready for review February 17, 2026 21:59
@dannf dannf force-pushed the multiple-env-files branch from 3816e41 to 42d5901 Compare February 17, 2026 22:31
89luca89
89luca89 previously approved these changes Feb 18, 2026
@89luca89
Copy link
Contributor

LGTM just a couple of lint nits about the docs

I need a way to inject more environment variables into the build.
melange supports a --env-file for specifying environment variables.
Wolfi builds already use this parameter to pass static, arch-specific
variables in. Specifying a second --env-file nullifies the first.
Let's allow multiple --env-file options, with each subsequent --env-file
overlaying values on top of the previous ones.

Note that if any users were relying on the previous behavior of subsequent
`--env-file` options nullifying all earlier ones, this would break that
use case.

Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
@dannf dannf force-pushed the multiple-env-files branch from 1f35f24 to 90c20b9 Compare February 18, 2026 15:26
@dannf dannf enabled auto-merge (squash) February 18, 2026 15:26
@dannf dannf requested a review from 89luca89 February 18, 2026 15:43
@dannf dannf merged commit 643c91e into chainguard-dev:main Feb 18, 2026
59 of 61 checks passed
@dannf dannf deleted the multiple-env-files branch February 18, 2026 20:59
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.

2 participants

Comments