Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jbangdev/jbang
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3399a6e7c620dbc9a5cf078029805ae6e7969ae3
Choose a base ref
..
head repository: jbangdev/jbang
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 754a7d0a7227b37c82c488f323964f92ec939bdf
Choose a head ref
Showing with 9 additions and 0 deletions.
  1. +2 −0 src/main/java/dev/jbang/cli/JBang.java
  2. +7 −0 src/test/java/dev/jbang/cli/TestRun.java
2 changes: 2 additions & 0 deletions src/main/java/dev/jbang/cli/JBang.java
Original file line number Diff line number Diff line change
@@ -254,6 +254,8 @@ public static CommandLine getCommandLine(PrintWriter localout, PrintWriter local
.setDefaultValueProvider(defaultValueProvider)
.setResourceBundle(new ConfigurationResourceBundle())
.setStopAtPositional(true)
.setAllowOptionsAsOptionParameters(true)
.setAllowSubcommandsAsOptionParameters(true)
.setOut(localout)
.setErr(localerr);
}
7 changes: 7 additions & 0 deletions src/test/java/dev/jbang/cli/TestRun.java
Original file line number Diff line number Diff line change
@@ -2516,4 +2516,11 @@ void testCatalogAliasArguments() throws IOException {

assertThat(cmdline, endsWith("echo baz"));
}

@Test
void testNativeOptsVerbose() {
String arg = examplesTestFolder.resolve("helloworld.java").toAbsolutePath().toString();
CommandLine.ParseResult pr = JBang.getCommandLine().parseArgs("build", "-n", "-N=--verbose", arg);
}

}