Skip to content

Fix Config Loading + Base Dirs CLI Flag - #60

Merged
SUSTAPLE117 merged 2 commits into
mainfrom
maint/fixCOnfigLoading
Jun 17, 2026
Merged

Fix Config Loading + Base Dirs CLI Flag#60
SUSTAPLE117 merged 2 commits into
mainfrom
maint/fixCOnfigLoading

Conversation

@SUSTAPLE117

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts Bagel’s configuration-loading behavior so scans can proceed when auto-discovered configs are missing/unreadable, and adds a scan CLI flag to override file-index base directories.

Changes:

  • Update config.Load to treat auto-discovery config read failures as non-fatal while keeping explicit --config failures fatal.
  • Add unit tests covering missing config, unusable discovered config, and explicit config failure behavior.
  • Add --base-dirs flag to bagel scan to override file_index.base_dirs from configuration.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
pkg/config/config.go Refines ReadInConfig error handling (fallback vs. fail loudly) and adds logging.
pkg/config/config_test.go Adds tests to lock in the new config-loading contracts.
cmd/bagel/scan.go Introduces --base-dirs flag and applies it to the loaded config before scanning.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/config/config.go
Comment thread pkg/config/config_test.go
Comment thread pkg/config/config_test.go
Comment thread cmd/bagel/scan.go
@SUSTAPLE117
SUSTAPLE117 marked this pull request as ready for review June 17, 2026 13:24
@SUSTAPLE117
SUSTAPLE117 merged commit 9f58223 into main Jun 17, 2026
7 checks passed
@SUSTAPLE117
SUSTAPLE117 deleted the maint/fixCOnfigLoading branch June 17, 2026 14:58
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.

3 participants