Skip to content

Commit

Permalink
Merge pull request #52 from cjtallman/master
Browse files Browse the repository at this point in the history
Fixed an issue when trying to print help for a nil default option value.
  • Loading branch information
amireh committed Oct 27, 2015
2 parents b8c1414 + e865746 commit 5a9bb44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cliargs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ function cli:print_help(noprint)
end

if self.optargument.maxcount > 0 then
append(self.optargument.key, self.optargument.desc .. " (optional, default: " .. self.optargument.default .. ")")
append(self.optargument.key, self.optargument.desc .. " (optional, default: " .. tostring(self.optargument.default) .. ")")
end

if #self.optional > 0 then
Expand Down

0 comments on commit 5a9bb44

Please sign in to comment.