Sha256: f5d4b880010de041ce171edb7598131cf3a6019a2fba8fdc5130dcb4ad1fd9e2
Contents?: true
Size: 650 Bytes
Versions: 8
Compression:
Stored size: 650 Bytes
Contents
# frozen_string_literal: true require "English" module ReactOnRails module GitUtils def self.uncommitted_changes?(message_handler, git_installed: true) return false if ENV["COVERAGE"] == "true" status = `git status --porcelain` return false if git_installed && status&.empty? error = if git_installed "You have uncommitted code. Please commit or stash your changes before continuing" else "You do not have Git installed. Please install Git, and commit your changes before continuing" end message_handler.add_error(error) true end end end
Version data entries
8 entries across 8 versions & 1 rubygems