Skip to content

Commit

Permalink
Dump repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Jan 27, 2021
1 parent 2f1bd17 commit d74b9d8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/lib/installation/console_commands.rb
Expand Up @@ -11,6 +11,7 @@
#
# ------------------------------------------------------------------------------

require "yaml"
require "yast"

module Installation
Expand Down Expand Up @@ -50,6 +51,16 @@ def network
:network
end

def repositories
Yast.import "Pkg"

repos = Yast::Pkg.SourceGetCurrent(false).map do |repo|
Yast::Pkg.SourceGeneralData(repo)
end

puts repos.to_yaml
end

def method_missing(_method_name, *_args)
puts "Error: Unknown command"
puts
Expand Down

0 comments on commit d74b9d8

Please sign in to comment.