Skip to content

Crash when DOCKER_CONTEXT points to a non-existent context #21

@ThomasMinor

Description

@ThomasMinor

Describe the crash:
If the context defined in the environment variable DOCKER_CONTEXT doesn't exist, ccManager crashes with the following error:

Failed to initialize: unable to resolve docker endpoint: context "desktop-linux": context not found: open /Users/xxxxx/.docker/contexts/meta/fe9c6bd7a66301f49ca9b6a70b217107cd1284598bfc254700c989b916da791e/meta.json: no such file or directory

Steps to reproduce:

  1. Set the environment variable DOCKER_CONTEXT to a context name that does not exist.
  2. Start ccManager.

Expected behavior:
ccManager should handle missing contexts gracefully and not crash, possibly by displaying a clear error message or falling back to a default context.

Actual behavior:
The application crashes as shown above.

Additional info:

  • Please add handling for missing Docker contexts to avoid crashing.
  • Example path: /Users/xxxxx/.docker/contexts/meta/...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions