Skip to content

Commit

Permalink
Merge pull request #370 from zanata/ZNTA-1924-setusagewidth
Browse files Browse the repository at this point in the history
fix: replace setUsageWidth(int) in org.kohsuke.args4j.CmdLineParser
  • Loading branch information
Alex Eng committed Jun 6, 2017
2 parents e8ddbd4 + aa02b4d commit b0d6aa6
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -26,9 +26,10 @@ public ArgsUtil(AppAbortStrategy strategy, BasicOptions opts) {
this.opts = opts;
this.parser = new CmdLineParser(opts);
try {
parser.setUsageWidth(Integer.parseInt(System.getenv("COLUMNS")));
parser.getProperties()
.withUsageWidth(Integer.parseInt(System.getenv("COLUMNS")));
} catch (Exception e) {
parser.setUsageWidth(120);
parser.getProperties().withUsageWidth(120);
}
}

Expand Down

0 comments on commit b0d6aa6

Please sign in to comment.