From 72013660913de2a15bacf2cea433351c4b3ee2e1 Mon Sep 17 00:00:00 2001 From: Zack Hobson Date: Mon, 2 Dec 2013 12:52:26 -0800 Subject: app: do not repeatedly stat the security binary --- lib/hcl/app.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3