TIBCOSoftware / flogo-cli

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

Better help on the CLI (#2) #122

Closed ffassler closed 6 years ago

ffassler 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: #72

What is the current behavior?

When entering a cmd with an incorrect syntax we should display the correct syntax again. For example the following cmd:

flogo create -f SampleApp2 ~/Downloads/SampleApp.json

Simply yields the following error.

What is the new behavior?

The correct syntax should be displayed again after the error.

Error: Error loading app file 'SampleApp2' - open SampleApp2: no such file or directory

I changed also the details of the command usage to have all the options.

Example

$ flogo create -f example.json app

Error: Error loading app file 'example.json' - open example.json: no such file or directory

Usage:

    flogo  create AppName

Creates a flogo project.

Options:
    -flv     specify the flogo dependency constraints as comma separated value (for example github.com/TIBCOSoftware/flogo-lib@0.0.0,github.com/TIBCOSoftware/flogo-contrib@0.0.0)
    -f       specify the flogo.json to create project from
    -vendor  specify existing vendor directory to copy