File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/main/java/com/oracle/weblogicx/imagebuilder/cli Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ public static void main(String[] args) {
41
41
CLIDriver cliDriver = new CLIDriver ();
42
42
if (args .length == 0 ) {
43
43
CommandLine .usage (cliDriver , System .out );
44
+ System .exit (-1 );
44
45
} else {
45
46
//List<String> argsList = Stream.of(args).collect(Collectors.toList());
46
47
//argsList.add("--cli");
@@ -52,9 +53,9 @@ public static void main(String[] args) {
52
53
response .getMessage ()));
53
54
//Map<String, String> results = response.getResult();
54
55
//results.forEach((key, value) -> System.out.println(key + "=" + value));
55
- } /* else {
56
- System.out.println("response is null");
57
- }*/
56
+ System . exit ( response . getStatus ());
57
+ }
58
+ System . exit (- 1 );
58
59
}
59
60
}
60
61
}
Original file line number Diff line number Diff line change @@ -122,8 +122,7 @@ public CommandResponse call() throws Exception {
122
122
logger .info ("docker cmd = " + String .join (" " , cmdBuilder ));
123
123
Utils .runDockerCommand (isCLIMode , cmdBuilder , dockerLog );
124
124
} catch (Exception ex ) {
125
- throw ex ;
126
- // return new CommandResponse(-1, ex.getMessage());
125
+ return new CommandResponse (-1 , ex .getMessage ());
127
126
} finally {
128
127
Utils .deleteFilesRecursively (tmpDir );
129
128
Utils .deleteFilesRecursively (tmpDir2 );
You can’t perform that action at this time.
0 commit comments