lib/giblish/cmdline.rb in giblish-2.1.2 vs lib/giblish/cmdline.rb in giblish-2.2.0
- old
+ new
@@ -274,12 +274,16 @@
if opts.server_css && opts.format != "html"
raise OptionParser::InvalidArgument, "The '-w' flag can only be used for the 'html' format flags"
end
- if opts.resource_dir.nil? ^ opts.style_name.nil?
- raise OptionParser::InvalidArgument, "Either both '-s' and '-r' flags must be given or none of them."
+ if opts.style_name && opts.resource_dir.nil?
+ raise OptionParser::InvalidArgument, "The '-s' flag requires the use of the '-r' flag as well."
end
+
+ # if opts.resource_dir.nil? ^ opts.style_name.nil?
+ # raise OptionParser::InvalidArgument, "Either both '-s' and '-r' flags must be given or none of them."
+ # end
if opts.resource_dir && !opts.resource_dir.exist?
raise OptionParser::InvalidArgument, "Could not find resource path #{opts.resource_dir}"
end