Skip to content

Commit 5a9bb44

Browse files
committed
Merge pull request #52 from cjtallman/master
Fixed an issue when trying to print help for a nil default option value.
2 parents b8c1414 + e865746 commit 5a9bb44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cliargs.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ function cli:print_help(noprint)
613613
end
614614

615615
if self.optargument.maxcount > 0 then
616-
append(self.optargument.key, self.optargument.desc .. " (optional, default: " .. self.optargument.default .. ")")
616+
append(self.optargument.key, self.optargument.desc .. " (optional, default: " .. tostring(self.optargument.default) .. ")")
617617
end
618618

619619
if #self.optional > 0 then

0 commit comments

Comments
 (0)