Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Modified option parser to properly print usage for empty short options

  • Loading branch information...
commit 5866c606d1bafc1340729b102784deb6d1a883fb 1 parent e7bc101
@rinon rinon authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/util.js
View
6 src/util.js
@@ -274,7 +274,11 @@
var s = spec[i];
str += indent;
if (s.name) {
- str += flushLeft("-" + s.short, 4) + flushLeft("--" + s.name, 18);
+ if (s.short) {
+ str += flushLeft("-" + s.short, 4) + flushLeft("--" + s.name, 18);
+ } else {
+ str += flushLeft("", 4) + flushLeft("--" + s.name, 18);
+ }
} else {
str += flushLeft("-" + s.short, 22);
}
Please sign in to comment.
Something went wrong with that request. Please try again.