diff options
| author | JCount | 2017-04-07 16:25:21 -0400 |
|---|---|---|
| committer | JCount | 2017-04-08 20:20:26 -0400 |
| commit | 889d61660a8647451495f2b97daae09b2f0d57e3 (patch) | |
| tree | 12f0be65ed024633c42b965fcc752ae2913f95a0 /Library | |
| parent | 14a7ef591b68ebb4d901c2f2a9a1553be0e7af03 (diff) | |
| download | brew-889d61660a8647451495f2b97daae09b2f0d57e3.tar.bz2 | |
gpg: add version method to retrieve current version in path
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/gpg.rb | 5 |
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? |
