Skip to content

Commit

Permalink
Fix #453 RD_INSECURE_SSL causes npe
Browse files Browse the repository at this point in the history
  • Loading branch information
gschueler committed Jun 14, 2022
1 parent 1aa5a66 commit 9ed77fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rd-cli-tool/src/main/java/org/rundeck/client/tool/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.rundeck.client.tool.extension.RdCommandExtension;
import org.rundeck.client.tool.extension.RdTool;
import org.rundeck.client.tool.format.*;
import org.rundeck.client.tool.output.SystemOutput;
import org.rundeck.client.tool.util.ExtensionLoaderUtil;
import org.rundeck.client.tool.util.Resources;
import org.rundeck.client.util.*;
Expand Down Expand Up @@ -348,17 +349,17 @@ public static void setup(final Rd rd, RdBuilder builder) {

boolean insecureSsl = rd.getBool(ENV_INSECURE_SSL, false);
boolean insecureSslNoWarn = rd.getBool(ENV_INSECURE_SSL_NO_WARN, false);
rd.setOutput(builder.finalOutput());
if (insecureSsl && !insecureSslNoWarn) {
rd.getOutput().warning(
"# WARNING: RD_INSECURE_SSL=true, no hostname or certificate trust verification will be performed");
}
rd.setOutput(builder.finalOutput());
}

static class Rd extends ConfigBase implements RdApp, RdClientConfig, Closeable {
private final Resources resources = new Resources();
Client<RundeckApi> client;
private CommandOutput output;
private CommandOutput output = new SystemOutput();

public Rd(final ConfigValues src) {
super(src);
Expand Down

0 comments on commit 9ed77fe

Please sign in to comment.