Merge pull request #3032 from DomT4/gpg_tweaks
gpg: minor search priority tweaks
This commit is contained in:
commit
01af27fd3b
@ -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)
|
||||||
|
|||||||
@ -5,8 +5,8 @@ class GPG2Requirement < Requirement
|
|||||||
fatal true
|
fatal true
|
||||||
default_formula "gnupg"
|
default_formula "gnupg"
|
||||||
|
|
||||||
# MacGPG2/GPGTools installs GnuPG 2.0.x as a vanilla `gpg` symlink
|
# GPGTools installs GnuPG 2.0.x as a vanilla `gpg` symlink
|
||||||
# pointing to `gpg2`, as do we. Ensure we're actually using a 2.0 `gpg`.
|
# pointing to `gpg2`. Homebrew install 2.1.x as a non-symlink `gpg`.
|
||||||
# Support both the 2.0.x "stable" and 2.1.x "modern" series.
|
# We support both the 2.0.x "stable" and 2.1.x "modern" series here.
|
||||||
satisfy(build_env: false) { Gpg.gpg2 || Gpg.gpg }
|
satisfy(build_env: false) { Gpg.gpg || Gpg.gpg2 }
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user