Sha256: 902879032905ee05710cb7cd8cad3b3ff62623c533f0539cb6ddc64285a6f8fd
Contents?: true
Size: 644 Bytes
Versions: 25
Compression:
Stored size: 644 Bytes
Contents
# frozen_string_literal: true module Overcommit::Hook::PreCommit # Check if local Berksfile.lock matches Berksfile when either changes, unless # Berksfile.lock is ignored by git. # # @see http://berkshelf.com/ class BerksfileCheck < Base LOCK_FILE = 'Berksfile.lock'.freeze def run # Ignore if Berksfile.lock is not tracked by git ignored_files = execute(%w[git ls-files -o -i --exclude-standard]).stdout.split("\n") return :pass if ignored_files.include?(LOCK_FILE) result = execute(command) unless result.success? return :fail, result.stderr end :pass end end end
Version data entries
25 entries across 23 versions & 2 rubygems