Sha256: a0a922ed64f42724710726184e3670e428a041a8f80aa04302da7fa87c612de1

Contents?: true

Size: 409 Bytes

Versions: 3

Compression:

Stored size: 409 Bytes

Contents

# frozen_string_literal: true

module ReactOnRails
  module GitUtils
    def self.uncommitted_changes?(message_handler)
      return false if ENV["COVERAGE"] == "true"
      status = `git status --porcelain`
      return false if status.empty?
      error = "You have uncommitted code. Please commit or stash your changes before continuing"
      message_handler.add_error(error)
      true
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
react_on_rails-8.0.5 lib/react_on_rails/git_utils.rb
react_on_rails-8.0.4 lib/react_on_rails/git_utils.rb
react_on_rails-8.0.3 lib/react_on_rails/git_utils.rb