@Test public void unfindableLocalFile() throws Exception { CDepYml config = new CDepYml(); System.out.printf(new Yaml().dump(config)); File yaml = new File(".test-files/unfindableLocalFile/cdep.yml"); yaml.getParentFile().mkdirs(); Files.write("builders: [cmake, cmakeExamples]\ndependencies:\n- compile: ../not-a-file/cdep-manifest.yml\n", yaml, StandardCharsets.UTF_8); try { main("-wf", yaml.getParent()); fail("Expected failure"); } catch (RuntimeException e) { assertThat(e).hasMessage("Could not resolve '../not-a-file/cdep-manifest.yml'. It doesn't exist."); } }
public static void main(@NotNull String[] args) { try { new CDep(AnsiConsole.out, AnsiConsole.err, true).go(args, false); } catch (Throwable e) { e.printStackTrace(); System.exit(Integer.MIN_VALUE); } finally { AnsiConsole.out.close(); AnsiConsole.err.close(); } }
CDep { public static void main(@NotNull String[] args) { try { new CDep(AnsiConsole.out, AnsiConsole.err, true).go(args, false); } catch (Throwable e) { e.printStackTrace(); System.exit(Integer.MIN_VALUE); } finally { AnsiConsole.out.close(); AnsiConsole.err.close(); } } }
CDep { public static void main(@NotNull String[] args) { try { new CDep(AnsiConsole.out, AnsiConsole.err, true).go(args, false); } catch (Throwable e) { e.printStackTrace(); System.exit(Integer.MIN_VALUE); } finally { AnsiConsole.out.close(); AnsiConsole.err.close(); } } CDep(@NotNull PrintStream out, @NotNull PrintStream err, boolean ansi); }
CDep { public static void main(@NotNull String[] args) { try { new CDep(AnsiConsole.out, AnsiConsole.err, true).go(args, false); } catch (Throwable e) { e.printStackTrace(); System.exit(Integer.MIN_VALUE); } finally { AnsiConsole.out.close(); AnsiConsole.err.close(); } } CDep(@NotNull PrintStream out, @NotNull PrintStream err, boolean ansi); static void main(@NotNull String[] args); }
CDep { public static void main(@NotNull String[] args) { try { new CDep(AnsiConsole.out, AnsiConsole.err, true).go(args, false); } catch (Throwable e) { e.printStackTrace(); System.exit(Integer.MIN_VALUE); } finally { AnsiConsole.out.close(); AnsiConsole.err.close(); } } CDep(@NotNull PrintStream out, @NotNull PrintStream err, boolean ansi); static void main(@NotNull String[] args);  }