Skip to content

docs(configuration): say what an empty --env entry actually does - #1218

Merged
Chemaclass merged 2 commits into
mainfrom
docs/1217-env-file-empty-entry
Aug 14, 2026
Merged

docs(configuration): say what an empty --env entry actually does#1218
Chemaclass merged 2 commits into
mainfrom
docs/1217-env-file-empty-entry

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

Related #1217

The configuration guide said an empty entry in the -e/--env/--boot file "does wipe a value", which reads as a reset to the built-in default. It assigns the empty string, so blanking a boolean disables it instead of restoring the default — measured with BASHUNIT_SHOW_HEADER=true ambient and an empty entry: the header is hidden, where a reset to the default would show it.

💡 Changes

  • State what the empty entry does and how to actually get the default back (delete the entry)
  • Explain the cause next to the existing note on why the two config files differ: .env has a preservation pass for values it blanks, the --env path is a plain source under allexport without one
  • Cover the whole six-level precedence ladder with acceptance tests — every level was documented and none of it was executed, including the .env empty-entry preservation rule, --skip-env-file skipping both files, and flag ordering around --env

The guide said an empty entry in the -e/--env/--boot file "does wipe a value",
which reads as "reset it to the built-in default". It assigns the empty string
instead, and for a boolean that is not the default but a disabled setting:
with BASHUNIT_SHOW_HEADER=true in the environment and an empty entry in the
--env file, the header is hidden, where a reset to the default (true) would
show it.

The cause is that `.env` gets a preservation pass in config/env.sh for values
the file blanks, while the --env path in main/test.sh is a plain source under
allexport with no such pass.

Correct the sentence, note the missing preservation pass next to the existing
explanation of why the two files differ, and cover the whole six-level ladder
with acceptance tests -- none of it was executed anywhere.

Closes #1217
@Chemaclass Chemaclass added the documentation Improvements or additions to documentation label Aug 14, 2026
@Chemaclass Chemaclass self-assigned this Aug 14, 2026
@Chemaclass
Chemaclass merged commit 41ce18b into main Aug 14, 2026
61 of 62 checks passed
@Chemaclass
Chemaclass deleted the docs/1217-env-file-empty-entry branch August 14, 2026 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant