lib/gitlab/cli.rb in gitlab-4.2.0 vs lib/gitlab/cli.rb in gitlab-4.3.0
- old
+ new
@@ -50,18 +50,14 @@
@json_output = true
args.delete '--json'
end
unless valid_command?(cmd)
- puts "Unknown command. Run `gitlab help` for a list of available commands."
+ puts 'Unknown command. Run `gitlab help` for a list of available commands.'
exit(1)
end
- if args.any? && (args.last.start_with?('--only=') || args.last.start_with?('--except='))
- command_args = args[0..-2]
- else
- command_args = args
- end
+ command_args = args.any? && args.last.start_with?('--only=', '--except=') ? args[0..-2] : args
begin
command_args.map! { |arg| symbolize_keys(yaml_load(arg)) }
rescue => e
puts e.message