Skip to content

Fix: Crash when config file missing #2

@scooke11

Description

@scooke11

/bounty 75

Bug Description

The app crashes with an ugly stack trace when ~/.config/task-cli/config.yaml is missing.

Expected Behavior

Should either create a default config file or gracefully inform the user with a helpful error message.

Steps to Reproduce

  1. Delete config file: rm ~/.config/task-cli/config.yaml
  2. Run any command: python task.py list
  3. See ugly crash with FileNotFoundError

Current Behavior

Traceback (most recent call last):
  File "task.py", line X, in <module>
    load_config()
  File "task.py", line Y, in load_config
    with open(config_path) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/.config/task-cli/config.yaml'

Acceptance Criteria

  • No crash when config file is missing
  • Creates sensible default config OR shows clear error message
  • Tests added for missing config scenario
  • Documentation updated if needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    💎 BountyTest bounty issue for ai-gitops workflow validation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions