Commit afee38dd authored by Jan Provaznik's avatar Jan Provaznik

Merge branch 'secpick-improvements-better-errors' into 'master'

Update secpick to be more specific with errors

See merge request gitlab-org/gitlab!27178
parents b67ee058 0c9ea1ed
......@@ -159,7 +159,11 @@ module Secpick
options[:branch] ||= `git rev-parse --abbrev-ref HEAD`
options[:remote] ||= DEFAULT_REMOTE
abort("Missing options. Use #{$0} --help to see the list of options available".red) if options.value?(nil)
nil_options = options.select {|_, v| v.nil? }
unless nil_options.empty?
abort("Missing: #{nil_options.keys.join(', ')}. Use #{$0} --help to see the list of options available".red)
end
abort("Wrong version format #{options[:version].bold}".red) unless options[:version] =~ /\A\d*\-\d*\Z/
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment