bin/aptly-cli in aptly_cli-0.6.0 vs bin/aptly-cli in aptly_cli-0.6.1
- old
+ new
@@ -154,19 +154,16 @@
c.option '--default_component COMPONENT', String, 'Edit DefaultComponent for repo'
c.action do |args, options|
config = AptlyCli::AptlyLoad.new.configure_with($config_file)
handle_global_options options
aptly_command = AptlyCli::AptlyRepo.new(config, options)
- if options.default_distribution
- repo_options = { :DefaultDistribution => options.default_distribution.to_s }
- end
- if options.default_component
- repo_options = { :DefaultComponent => options.default_component.to_s }
- end
- if options.comment
- repo_options = { :Comment => options.comment.to_s }
- end
- puts aptly_command.repo_edit(options.name.to_s, repo_options || {})
+
+ repo_options = {}
+ repo_options[:DefaultDistribution] = options.default_distribution.to_s if options.default_distribution
+ repo_options[:DefaultComponent] = options.default_component.to_s if options.default_component
+ repo_options[:Comment] = options.comment.to_s if options.comment
+
+ puts aptly_command.repo_edit(options.name.to_s, repo_options)
end
end
command :repo_list do |c|
c.syntax = 'aptly-cli repo_list [options]'