summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZack Hobson2013-12-02 12:52:26 -0800
committerZack Hobson2013-12-02 12:52:26 -0800
commit72013660913de2a15bacf2cea433351c4b3ee2e1 (patch)
tree6ffe50acdf74bc26cf45d8a6f78937359186e6f0
parentf07437041e5817694efcb67506434b1c1fcae074 (diff)
downloadhcl-72013660913de2a15bacf2cea433351c4b3ee2e1.tar.bz2
app: do not repeatedly stat the security binary
-rw-r--r--lib/hcl/app.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/hcl/app.rb b/lib/hcl/app.rb
index f987eb9..6cfa0f8 100644
--- a/lib/hcl/app.rb
+++ b/lib/hcl/app.rb
@@ -190,7 +190,11 @@ EOM
end
def has_security_command
- File.exists?('/usr/bin/security')
+ if @has_security.nil?
+ @has_security = File.exists?('/usr/bin/security')
+ else
+ @has_security
+ end
end
def load_password config