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

Mvnd dont exit with Non-zero value when error occurs. #1129

Open
ZhangWen-Leo opened this issue Sep 5, 2024 · 0 comments
Open

Mvnd dont exit with Non-zero value when error occurs. #1129

ZhangWen-Leo opened this issue Sep 5, 2024 · 0 comments

Comments

@ZhangWen-Leo
Copy link

ZhangWen-Leo commented Sep 5, 2024

Here is my java code:

public void execInstall() {
  ProcessBuilder pb = new ProcessBuilder("mvnd install").inheritIO();
  Process process = pb.start();
  process.waitFor();
  if (process.exitValue() == 0) {
    // This means suceed
  } else {
    // This means some error occured
  }
}

But this haven't act as what I want.When something wrong occurs with the "mvnd install", I didn't get a non-zero value from the process.exitValue().

When I change the mvnd to mvn, it just act as I want.

Help me plz.

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