Module: Carson::Runtime::Repos
- Included in:
- Carson::Runtime
- Defined in:
- lib/carson/runtime/repos.rb
Instance Method Summary collapse
Instance Method Details
#repos!(json_output: false) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/carson/runtime/repos.rb', line 8 def repos!( json_output: false ) repos = config.govern_repos if json_output out.puts JSON.pretty_generate( { command: "repos", repos: repos } ) else if repos.empty? puts_line "No governed repositories." puts_line " Run carson onboard in a repo to register it." else puts_line "Governed repositories (#{repos.length}):" repos.each { |path| puts_line " #{path}" } end end EXIT_OK end |