Skip to content

feat(config): support project config file (.bashunitrc)#687

Merged
Chemaclass merged 1 commit into
mainfrom
feat/681-bashunitrc
Jun 3, 2026
Merged

feat(config): support project config file (.bashunitrc)#687
Chemaclass merged 1 commit into
mainfrom
feat/681-bashunitrc

Conversation

@Chemaclass
Copy link
Copy Markdown
Member

🤔 Background

Related #681

Projects could only configure bashunit through .env or CLI flags. A dedicated config file lets teams commit sensible defaults without boilerplate.

💡 Changes

  • Load a .bashunitrc file of KEY=value lines from the project root
  • Precedence: CLI flag > env var / .env > .bashunitrc > default (keys applied only when unset)
  • Handle comments, blank lines, optional export prefix and quotes; validate keys before eval
  • Honors --skip-env-file; documented in the configuration guide

Adds a project config file of KEY=value lines loaded before .env. Each
key is applied only when unset, so the precedence is
CLI flag > env var / .env > .bashunitrc > default. Comments (#), blank
lines, optional 'export ' prefix and surrounding quotes are handled;
keys are validated as shell identifiers before eval. Honors
--skip-env-file. Bash 3.0+ compatible.

Closes #681
@Chemaclass Chemaclass added the enhancement New feature or request label Jun 3, 2026
@Chemaclass Chemaclass self-assigned this Jun 3, 2026
@Chemaclass Chemaclass merged commit 090f044 into main Jun 3, 2026
48 of 49 checks passed
@Chemaclass Chemaclass deleted the feat/681-bashunitrc branch June 3, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant