From 8a8ba080385808ca9149e5ceacf99853e7c44c4f Mon Sep 17 00:00:00 2001 From: Graham Gilbert Date: Tue, 8 Nov 2016 08:23:54 +0000 Subject: [PATCH] Make sure tools directory actually exists --- lib/facter/xcode_active_directory.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/facter/xcode_active_directory.rb b/lib/facter/xcode_active_directory.rb index 2006f08..275bf25 100644 --- a/lib/facter/xcode_active_directory.rb +++ b/lib/facter/xcode_active_directory.rb @@ -5,7 +5,11 @@ if $CHILD_STATUS.exitstatus.nonzero? nil else - output + if File.exist?(output.to_s.strip) + output + else + nil + end end end end