gpg: flip search priority order
Makes more sense this way around now Homebrew has migrated across to 2.1.x & the latest version of that doesn't install as `gpg2` any more. Doesn't need to be merged before this PR but for the sake of referencing the PR introducing the upstream death of the `gpg2` symlink is: https://github.com/Homebrew/homebrew-core/pull/16580
This commit is contained in:
		
							parent
							
								
									0933686dea
								
							
						
					
					
						commit
						ca9b8bea2e
					
				@ -7,8 +7,8 @@ class Gpg
 | 
				
			|||||||
      next unless gpg_short_version
 | 
					      next unless gpg_short_version
 | 
				
			||||||
      gpg_version = Version.create(gpg_short_version.to_s)
 | 
					      gpg_version = Version.create(gpg_short_version.to_s)
 | 
				
			||||||
      @version = gpg_version
 | 
					      @version = gpg_version
 | 
				
			||||||
      gpg_version == Version.create("2.0") ||
 | 
					      gpg_version == Version.create("2.1") ||
 | 
				
			||||||
        gpg_version == Version.create("2.1")
 | 
					        gpg_version == Version.create("2.0")
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -20,7 +20,7 @@ class Gpg
 | 
				
			|||||||
    find_gpg("gpg2")
 | 
					    find_gpg("gpg2")
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  GPG_EXECUTABLE = gpg2 || gpg
 | 
					  GPG_EXECUTABLE = gpg || gpg2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def self.available?
 | 
					  def self.available?
 | 
				
			||||||
    File.executable?(GPG_EXECUTABLE.to_s)
 | 
					    File.executable?(GPG_EXECUTABLE.to_s)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user