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

--state option outputs metadata #508

Open
Dogacel opened this issue Apr 18, 2023 · 0 comments
Open

--state option outputs metadata #508

Dogacel opened this issue Apr 18, 2023 · 0 comments

Comments

@Dogacel
Copy link

Dogacel commented Apr 18, 2023

From help,

    --state                     Only output diff state: no_changes,
                                incompatible, compatible

this doesn't align with reality. We had a case where the state outputted metadata.

Caused by this line:

System.out.println(result.isChanged().getValue());

We can simply

to include something like

public DiffResult toStateDiff() {
  if (this.isUnchanged()) {
    return DiffResult.UNCHANGED;
  }

 if (this.isCompatible()) {
    return DiffResult.COMPATIBLE;
 }

 return DiffResult.INCOMPATIBLE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant