Sha256: 565db32e54b6a083e9ae36b7812bd610f86d05b4862e80b5b83348fb140ae847

Contents?: true

Size: 464 Bytes

Versions: 8

Compression:

Stored size: 464 Bytes

Contents

module Braid
  module Commands
    class Remove < Command
      def run(path)
        mirror = config.get!(path)

        bail_on_local_changes!

        with_reset_on_error do
          msg "Removing mirror from '#{mirror.path}/'."

          git.rm_r(mirror.path)

          config.remove(mirror)
          add_config_file

          commit_message = "Remove mirror '#{mirror.path}/'"
          git.commit(commit_message)
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
evilchelu-braid-0.4.10 lib/braid/commands/remove.rb
evilchelu-braid-0.4.11 lib/braid/commands/remove.rb
evilchelu-braid-0.4.12 lib/braid/commands/remove.rb
evilchelu-braid-0.4.13 lib/braid/commands/remove.rb
norbert-braid-0.4.12 lib/braid/commands/remove.rb
norbert-braid-0.4.13 lib/braid/commands/remove.rb
norbert-braid-0.4.9 lib/braid/commands/remove.rb
tapajos-braid-0.4.9.1 lib/braid/commands/remove.rb