Skip to content

Better error reporting for using wrong type on conditions #60

Description

@MartinHelmut

Reproducing

Configuration:

[commands.hello]
script = "echo %{name 'Name'}"

[params.name]
description = "Say my name."

Running:

litr hello --name=true

Prints a duplicated, wrong error message:

Error: Problem parsing script!
  → /path/to/litr.toml
2 | script = "echo Hello %{name 'bob'}"
  |                                 └─ Cannot parse at `'bob'`: Expected `}`.
 ...
2 | script = "echo Hello %{name 'bob'}"
  |                                 └─ Cannot parse at `'bob'`: Expected `}`.

Problem

This error message does not give any context what is wrong. it should point to using boolean parameters for condition, maybe even show how to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprove on an existing feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions