aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/gpg.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/gpg.rb b/Library/Homebrew/gpg.rb
index 777542055..cb9e367df 100644
--- a/Library/Homebrew/gpg.rb
+++ b/Library/Homebrew/gpg.rb
@@ -6,6 +6,7 @@ class Gpg
gpg_short_version = Utils.popen_read(gpg, "--version")[/\d\.\d/, 0]
next unless gpg_short_version
gpg_version = Version.create(gpg_short_version.to_s)
+ @version = gpg_version
gpg_version == Version.create("2.0") ||
gpg_version == Version.create("2.1")
end
@@ -25,6 +26,10 @@ class Gpg
File.executable?(GPG_EXECUTABLE.to_s)
end
+ def self.version
+ @version if available?
+ end
+
def self.create_test_key(path)
odie "No GPG present to test against!" unless available?