@@ -531,7 +531,7 @@ def lockfile_changes_summary(update_refused_reason)
531531
532532 return unless added . any? || deleted . any? || changed . any? || resolve_needed?
533533
534- msg = String . new ( "#{ change_reason . capitalize . strip } , but " )
534+ msg = String . new ( "#{ change_reason [ 0 ] . upcase } #{ change_reason [ 1 ..- 1 ] . strip } , but " )
535535 msg << "the lockfile " unless msg . start_with? ( "Your lockfile" )
536536 msg << "can't be updated because #{ update_refused_reason } "
537537 msg << "\n \n You have added to the Gemfile:\n " << added . join ( "\n " ) if added . any?
@@ -557,6 +557,7 @@ def something_changed?
557557 @missing_lockfile_dep ||
558558 @unlocking_bundler ||
559559 @locked_spec_with_missing_checksums ||
560+ @locked_spec_with_empty_checksums ||
560561 @locked_spec_with_missing_deps ||
561562 @locked_spec_with_invalid_deps
562563 end
@@ -844,6 +845,7 @@ def lockfile_changed_reason
844845 [ @missing_lockfile_dep , "your lockfile is missing \" #{ @missing_lockfile_dep } \" " ] ,
845846 [ @unlocking_bundler , "an update to the version of Bundler itself was requested" ] ,
846847 [ @locked_spec_with_missing_checksums , "your lockfile is missing a CHECKSUMS entry for \" #{ @locked_spec_with_missing_checksums } \" " ] ,
848+ [ @locked_spec_with_empty_checksums , "your lockfile has an empty CHECKSUMS entry for \" #{ @locked_spec_with_empty_checksums } \" " ] ,
847849 [ @locked_spec_with_missing_deps , "your lockfile includes \" #{ @locked_spec_with_missing_deps } \" but not some of its dependencies" ] ,
848850 [ @locked_spec_with_invalid_deps , "your lockfile does not satisfy dependencies of \" #{ @locked_spec_with_invalid_deps } \" " ] ,
849851 ] . select ( &:first ) . map ( &:last ) . join ( ", " )
@@ -903,13 +905,23 @@ def check_lockfile
903905 @locked_spec_with_invalid_deps = nil
904906 @locked_spec_with_missing_deps = nil
905907 @locked_spec_with_missing_checksums = nil
908+ @locked_spec_with_empty_checksums = nil
906909
907910 missing_deps = [ ]
908911 missing_checksums = [ ]
912+ empty_checksums = [ ]
909913 invalid = [ ]
910914
911915 @locked_specs . each do |s |
912- missing_checksums << s if @locked_checksums && s . source . checksum_store . missing? ( s )
916+ if @locked_checksums
917+ checksum_store = s . source . checksum_store
918+
919+ if checksum_store . missing? ( s )
920+ missing_checksums << s
921+ elsif checksum_store . empty? ( s )
922+ empty_checksums << s
923+ end
924+ end
913925
914926 validation = @locked_specs . validate_deps ( s )
915927
@@ -918,6 +930,7 @@ def check_lockfile
918930 end
919931
920932 @locked_spec_with_missing_checksums = missing_checksums . first . name if missing_checksums . any?
933+ @locked_spec_with_empty_checksums = empty_checksums . first . name if empty_checksums . any?
921934
922935 if missing_deps . any?
923936 @locked_specs . delete ( missing_deps )
0 commit comments