Skip to content

fix: create default config when missing#65

Open
ideook wants to merge 1 commit into
ApexOpsStudio:mainfrom
ideook:fix-missing-config
Open

fix: create default config when missing#65
ideook wants to merge 1 commit into
ApexOpsStudio:mainfrom
ideook:fix-missing-config

Conversation

@ideook
Copy link
Copy Markdown

@ideook ideook commented May 11, 2026

Summary

Fixes #2 by handling a missing ~/.config/task-cli/config.yaml gracefully.

Instead of crashing with FileNotFoundError, the CLI now:

  • Creates the config directory when needed
  • Writes a minimal default config file
  • Continues running the requested command

Verification

  • python3 -m py_compile task.py commands/*.py
  • HOME=$(mktemp -d) python3 task.py list
  • Confirmed ~/.config/task-cli/config.yaml is created automatically in the temporary HOME

@ideook ideook mentioned this pull request May 11, 2026
4 tasks
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