Skip to content

Commit eb18aa5

Browse files
committed
Now when an error occurs in the JBoss CLI execution for a configuration resource not found, the JBoss configuration fails
1 parent 14efd9d commit eb18aa5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/main/groovy/org/silverpeas/setup/api/JBossServer.groovy

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,13 @@ class JBossServer {
7878
}
7979

8080
private void assertCommandSucceeds(command) throws AssertionError, InvalidObjectException {
81-
if (command.exitValue() != 0) {
82-
String message = command.err.text
83-
if (!message) {
84-
throw new InvalidObjectException(command.in.text)
81+
String message = command.in.text
82+
if (command.exitValue() != 0 || message.contains('"outcome" => "failed"')) {
83+
String error = command.err.text
84+
if (!error) {
85+
throw new InvalidObjectException(message)
8586
}
86-
throw new AssertionError(message)
87+
throw new AssertionError(error)
8788
}
8889
}
8990

0 commit comments

Comments
 (0)