TIBCOSoftware / flogo-cli

Project Flogo Command Line Interface
http://flogo.io
BSD 3-Clause "New" or "Revised" License
57 stars 28 forks source link

Print proper error if trigger doesn't exist #109

Closed retgits closed 6 years ago

retgits commented 6 years ago

What kind of change does this PR introduce? (check one with "x")

[X] Bugfix
[] Feature
[] Code style update (formatting, local variables)
[] Refactoring (no functional changes, no api changes)
[] Other... Please describe:

Fixes: https://github.com/TIBCOSoftware/flogo/issues/286

What is the current behavior?

If the trigger id passed in doesn't exist an error is thrown

runtime.main_main·f: relocation target main.main not defined
runtime.main_main·f: undefined: "main.main"
FATAL: command "build" failed: exit status 2

What is the new behavior?

If the trigger id passed in doesn't exist a friendly error is shown

$ flogo build -e -shim my_lambda_trigger
Shim: my_lambda_trigger

Can't locate trigger with id [my_lambda_trigger] in flogo.json
Please check if you have specified the correct trigger id