Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Foster2013-07-22 13:14:07 -0400
committerBob Foster2013-07-22 13:14:07 -0400
commit9ef3d96735a1e8375a9ab400a69e51731846f63a (patch)
tree93a40a269d8abea205a363dcba266626c606d294 /hudson-cli
parent70db4ebf7ef892f87f0a6d1dd270d7642342eb32 (diff)
downloadorg.eclipse.hudson.core-9ef3d96735a1e8375a9ab400a69e51731846f63a.tar.gz
org.eclipse.hudson.core-9ef3d96735a1e8375a9ab400a69e51731846f63a.tar.xz
org.eclipse.hudson.core-9ef3d96735a1e8375a9ab400a69e51731846f63a.zip
Fix 413408 cli.close() was never called
Diffstat (limited to 'hudson-cli')
-rw-r--r--hudson-cli/src/main/java/hudson/cli/CLI.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/hudson-cli/src/main/java/hudson/cli/CLI.java b/hudson-cli/src/main/java/hudson/cli/CLI.java
index 13476ac6..b95bcd31 100644
--- a/hudson-cli/src/main/java/hudson/cli/CLI.java
+++ b/hudson-cli/src/main/java/hudson/cli/CLI.java
@@ -174,14 +174,16 @@ public class CLI {
args = Arrays.asList("help"); // default to help
}
CLI cli = new CLI(new URL(url));
+ int result = 0;
try {
// execute the command
// Arrays.asList is not serializable --- see 6835580
args = new ArrayList<String>(args);
- System.exit(cli.execute(args, System.in, System.out, System.err));
+ result = cli.execute(args, System.in, System.out, System.err);
} finally {
cli.close();
}
+ System.exit(result);
}
private static void printUsageAndExit(String msg) {

Back to the top