You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In using picocli version 0.9.7 as part of a Groovy script I am writing, I have uncovered an infinite loop in the usage() printer. Specifically, I have a command line so:
@Command(showDefaultValues = true)
class MainCommand {
@Option(names = "--config-dir", description = "The path to the directory holding the configs")
File configDir = Paths.get(getClass().getProtectionDomain().getCodeSource().getLocation().toURI()).getParent().getParent().resolve("configs").toFile()
}
This results in a long path like so: C:\Users\USERNAME\Development\MY_SOFTWARE\my-software-config\configs
This value, after running through break iterator, results in the value of variable text within method CommandLine.Help.TextTable.copy(BreakIterator line, Text text, Text destination, int offset) being \Users\USERNAME\Development\MY_SOFTWARE\my-software-config\configs, which is unable to be wrapped when used by CommandLine.Help.TextTable.putValue(int row, int col, Text value) line 3013. This inability to wrap causes the wrap iterator inside that function to go into an infinite loop.
Now, my workaround is to stop outputting the default value, but I imagine this could bite others as well, but that makes my script less clear.
The text was updated successfully, but these errors were encountered:
Apologies for the delay, I will see what I can do. What I'm thinking should happen in this case (where a single "word" is larger than the column's maximum width) is that the output should fall back to naive splitting and breaking in the middle of the word. What do you think?
In using picocli version 0.9.7 as part of a Groovy script I am writing, I have uncovered an infinite loop in the usage() printer. Specifically, I have a command line so:
This results in a long path like so:
C:\Users\USERNAME\Development\MY_SOFTWARE\my-software-config\configs
This value, after running through break iterator, results in the value of variable text within method
CommandLine.Help.TextTable.copy(BreakIterator line, Text text, Text destination, int offset)
being\Users\USERNAME\Development\MY_SOFTWARE\my-software-config\configs
, which is unable to be wrapped when used byCommandLine.Help.TextTable.putValue(int row, int col, Text value)
line 3013. This inability to wrap causes the wrap iterator inside that function to go into an infinite loop.Now, my workaround is to stop outputting the default value, but I imagine this could bite others as well, but that makes my script less clear.
The text was updated successfully, but these errors were encountered: