Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPFx: project upgrade should return a state beside error and log #630

Closed
StfBauer opened this issue Oct 8, 2018 · 2 comments
Closed

SPFx: project upgrade should return a state beside error and log #630

StfBauer opened this issue Oct 8, 2018 · 2 comments

Comments

@StfBauer
Copy link
Contributor

StfBauer commented Oct 8, 2018

Currently, in the callback of the project upgrade, only log and error get returned. This allows the following scenarios.

Case 1: Cannot downgrade: current project is newer than the generator - ERR filled but not LOG
Case 2: All good: Current project matches generator - ERR filled but not LOG
Case 3: Upgrade required: Current project is older and needs to be upgraded - ERR is empty but LOG is filled

For case 1 and case 2, it would be great if this can return an error code to make a distinctive decision based on the error code.
For example:
ERROR CODE: 1 - Good to go no upgrade required
ERROR CODE: -1 - Downgrade not supported.

@waldekmastykarz
Copy link
Member

This is a good point, especially when you think of integrating CLI in other solutions and need more information than a faulty error code.

@waldekmastykarz
Copy link
Member

@StfBauer could you please check if #631 has the information you'd need?

@waldekmastykarz waldekmastykarz added this to the v1.8.0 milestone Oct 10, 2018
appieschot pushed a commit to appieschot/cli-microsoft365 that referenced this issue Oct 10, 2018
VelinGeorgiev pushed a commit to VelinGeorgiev/office365-cli that referenced this issue Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants