Github user mmiklavc commented on a diff in the pull request: https://github.com/apache/metron/pull/760#discussion_r139550653 --- Diff: metron-platform/metron-common/src/main/java/org/apache/metron/common/cli/ConfigurationManager.java --- @@ -130,29 +201,39 @@ public void pull(CuratorFramework client, String outFileStr, final boolean force public void visit(ConfigurationType configurationType, String name, String data) { File out = getFile(outputDir, configurationType, name); if (!out.exists() || force) { - if(!out.exists()) { + if (!out.exists()) { out.getParentFile().mkdirs(); } try { Files.write(data, out, Charset.defaultCharset()); } catch (IOException e) { throw new RuntimeException("Sorry, something bad happened writing the config to " + out.getAbsolutePath() + ": " + e.getMessage(), e); } - } - else if(out.exists() && !force) { + } else if (out.exists() && !force) { throw new IllegalStateException("Unable to overwrite existing file (" + out.getAbsolutePath() + ") without the force flag (-f or --force) being set."); } } }); } public void push(String inputDirStr, CuratorFramework client) throws Exception { - final File inputDir = new File(inputDirStr); + final File inputDir = new File(inputDirStr); --- End diff -- Latest commit addresses the input dir null check.
---