Fix old_opt_record.blank? check for Migrator#unlink_oldname_opt

- This was determinig `blank?` on a `Pathname` object, which returned
  `true` always, making the test fail. Instead, check the string value.
This commit is contained in:
Issy Long 2023-04-07 19:30:34 +01:00
parent da734a30c2
commit abbb0fbd76
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4

View File

@ -360,7 +360,7 @@ class Migrator
# Remove `opt/oldname` link if it belongs to newname.
def unlink_oldname_opt
return if old_opt_record.blank?
return if old_opt_record.to_s.blank?
return unless old_opt_record.symlink?
return unless old_opt_record.exist?
return unless new_linked_keg_record.exist?