Skip to content

Fix missing config handling#90

Open
darshan-Jahagirdar wants to merge 1 commit into
ApexOpsStudio:mainfrom
darshan-Jahagirdar:codex/handle-missing-config
Open

Fix missing config handling#90
darshan-Jahagirdar wants to merge 1 commit into
ApexOpsStudio:mainfrom
darshan-Jahagirdar:codex/handle-missing-config

Conversation

@darshan-Jahagirdar
Copy link
Copy Markdown

@darshan-Jahagirdar darshan-Jahagirdar commented May 13, 2026

Fixes #2.

Changes

  • Create ~/.config/task-cli/config.yaml with default settings when it is missing.
  • Load config before command execution so real CLI commands exercise the missing-config path.
  • Preserve existing config files unchanged.
  • Document the automatic default config behavior.

Tests

  • python -m pytest test_task.py -> 5 passed
  • python task.py list with a temporary empty home directory -> creates config and prints No tasks yet!

/claim #2

@darshan-Jahagirdar
Copy link
Copy Markdown
Author

Validation update for this PR:

ext py -3.11 -B -m pytest test_task.py git diff --check

Result: 5 tests passed and the diff whitespace check passed. I installed pytest into a temporary test-only directory for this run and removed it afterward.

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