TIBCOSoftware / flogo-cli

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

Remove error message in 'flogo version' command when there is no project in current directory #120

Closed debovema closed 6 years ago

debovema 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:

When the command flogo version is used in a directory with no Flogo project (i.e. no flogo.json file), there is an error message displayed saying it is not possible to open the project.

This error message is annoying and misleading for users. When installing a CLI tool, the first thing done is often to execute it with --version or version parameter to check whether everything is running fine.

What is the current behavior?

The command flogo version in a directory with no Flogo project (i.e. no flogo.json file) outputs:

flogo cli version [v0.5.6-2-g867ad50]
Error opening flogo app project: Invalid project, source directory doesn't exists

What is the new behavior?

The command flogo version in a directory with no Flogo project (i.e. no flogo.json file) outputs:

flogo cli version [v0.5.6-3-gf43e112]

The command flogo version in a directory with a Flogo project (i.e. no flogo.json file) output remains unchanged:

flogo cli version [v0.5.6-3-gf43e112]
Your project uses github.com/TIBCOSoftware/flogo-contrib version v0.5.6
Your project uses github.com/TIBCOSoftware/flogo-lib version v0.5.6
mellistibco commented 6 years ago

thanks for the pr @debovema, appreciate the help! 🙌 We're sending over Flogo swag to our contributors email me if you'd like us to send some stuff your way (mellis@tibco.com).

debovema commented 6 years ago

Hi @mellistibco,

At our company we already are a TIBCO partner in France. We want to get involved in TIBCO Flogo development and solutions. The swag would be very welcome ! I send you an email with details.