Repository navigation
Conversation
A parameter value the build could not parse used to abort the process through Assert.Fail. Built-in parameters are resolved inside FalloutBuild's static constructor, so the exception escaped before any target ran and before the consumer had a chance to handle it. The standard Unix HOST variable made this routine. Every zsh user has HOST exported, and Fallout reads it as the value for the Host parameter, so builds failed at startup with "Value 'M2' could not be converted to 'Host'". The same happened for any unusable value, for example VERBOSITY set to something that is not a verbosity level. Parameters now report a warning and use the default instead. Warnings go to standard error rather than Serilog, because Serilog is not configured yet at this point in startup. That also makes the existing "multiple values are provided" warning visible, which it never was. Fixes Fallout-build#705.
The documentation states that parameters can be set with a FALLOUT_ prefix, but the resolver only ever looked for NUKE_. A FALLOUT_ variable was ignored. The resolver now matches FALLOUT_ and NUKE_ before the bare parameter name. Prefixed names come first because the bare match is case-insensitive, so on Unix the HOST variable matches the Host parameter and would otherwise shadow FALLOUT_HOST. This also fixes a case where an explicit override was dropped. With HOST and NUKE_HOST both set, both were collected as candidates, the resolver saw more than one, and it fell back to the default. The prefixed value now wins. Fixes Fallout-build#457.
SonnyRR
marked this pull request as ready for review
October 10, 2026 08:46
dennisdoomen
approved these changes
Oct 10, 2026
This branch has not been deployed
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.
An environment variable the build cannot read now falls back to the default instead of aborting the process. The
FALLOUT_prefix documented in the parameters page now works.What changed
FalloutBuild's static constructor, so throwing there killed the process before any target ran.FALLOUT_andNUKE_prefixed names are matched before the bare parameter name.Why the prefixes are matched first
The bare match is case-insensitive, so on Unix the
HOSTvariable matches theHostparameter. If the bare match ran first it would always shadowFALLOUT_HOST, and the documented prefix would have no effect on the parameter that needs it most.This also fixes an explicit override being dropped. With both
HOSTandNUKE_HOSTset, both were collected as candidates, the resolver saw more than one, and it fell back to the default.No behaviour is removed
Every environment variable spelling that resolved before still resolves:
Host=,host=in lower case,NUKE_HOST=,--host, and the bare fuzzy match. Nothing about matching was narrowed, so the change is identical on Windows, macOS and Linux.One case changes: a
FALLOUT_*variable that is set today and ignored will start taking effect. This is unavoidable, becauseHOSTandHostare the same string under case-insensitive comparison, so a bare match would always shadow the prefix.Verification
Fallout.Build.Specs: 250 passed.HOST=M2, the case from [Bug] Standard UnixHOSTenvironment variable hijacks the built-inHostparameter - every build crashes in the static constructor #705. Before:TypeInitializationException, exit 1. After: exit 0, one warning, help renders.HOST=M2 FALLOUT_HOST=Terminalproduces no warning. The prefixed value wins over the bareHOST.The two commits are separable. The first fixes the crash on its own; the second adds the
FALLOUT_prefix and the precedence rule.Closes #705
Fixes #457