turbot / pipe-fittings

Shared components for use across pipe projects.

Home Page:https://github.com/turbot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve error message if variables are defined incorrectly

cbruno10 opened this issue · comments

Describe the bug
If I have a flowpipe.fpvars:

test = abc

When I try to run a pipeline or start a server, I get an unhelpful error:

cbruno@M1P trello % flowpipe pipeline run get_list --arg list_id=abc
Error: Variables not allowed: Variables may not be used here.

Flowpipe version (flowpipe -v)
v0.3.0

To reproduce
Create the file above and run flowpipe server in any mod

Expected behavior
The error message should tell me where the offending line is

Additional context
Add any other context about the problem here.

Should be fixed in the upcoming v0.3.1.

New error message will include the filename and line number.

Error: Variables not allowed: Variables may not be used here.
(internal/es/estest/single_pipeline/flowpipe.fpvars:3,7)
Variables not allowed: Variables may not be used here.
(internal/es/estest/single_pipeline/flowpipe.fpvars:1,8)