Merge pull request #71 from garethr/rake-file-fix

Fix issue running strings:generate without a yardopts file
This commit is contained in:
Hailee Kenney 2016-02-08 22:00:29 -08:00
commit 678ba735e8
1 changed files with 2 additions and 2 deletions

View File

@ -15,14 +15,14 @@ module PuppetX::PuppetLabs::Strings::Util
# by using the `.yardopts` file. YARD will autoload any options placed in
# that file.
options = args.pop
YARD::Config.options = YARD::Config.options.merge(options)
YARD::Config.options = YARD::Config.options.merge(options) if options
# For now, assume the remaining positional args are a list of manifest
# and ruby files to parse.
yard_args = (args.empty? ? MODULE_SOURCEFILES : args)
# If json is going to be emitted to stdout, suppress statistics.
if options[:emit_json_stdout]
if options && options[:emit_json_stdout]
yard_args.push('--no-stats')
end