Skip to content

fix: graceful handling of missing config file#37

Open
rainlee wants to merge 2 commits intoApexOpsStudio:mainfrom
rainlee:bounty/2-fix-missing-config
Open

fix: graceful handling of missing config file#37
rainlee wants to merge 2 commits intoApexOpsStudio:mainfrom
rainlee:bounty/2-fix-missing-config

Conversation

@rainlee
Copy link
Copy Markdown

@rainlee rainlee commented Mar 27, 2026

Closes #2

Problem

App crashed with FileNotFoundError when ~/.config/task-cli/config.yaml was missing.

Fix

  • load_config() now checks if the config file exists before opening
  • If missing, creates parent directories and writes a sensible default config
  • No crash, no confusing stack trace

Tests

Added 2 new tests:

  • test_load_config_missing_file: verifies default config is created
  • test_load_config_existing_file: verifies existing config is read correctly

All 4 tests pass.

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.

Fix: Crash when config file missing

1 participant