Skip to content

Improve error message when mirrord-config extension is not supported. #3371

@josephmate

Description

@josephmate

Problem

When using a file that does not end in json/yml/yaml/toml, you get the below error:

All supported extensions are hardcoded here: https://github.com/metalbear-co/mirrord/blob/main/mirrord/config/src/lib.rs#L705

mirrord exec \
  --config-file valid \
  -- ls
  x mirrord exec
    ✓ running on latest (3.144.0)!
Error:   × Failed to verify mirrord config: mirrord-config: Unsupported configuration file format!
  ╰─▶ mirrord-config: Unsupported configuration file format!
  help: Inspect your config file and arguments provided.

Solution

Error message should say

mirrord-config: you provided file with extension {extension} but mirrord supports only json, toml, yaml, and yaml

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions