From 3f6d31dee1ab2ef84185899caca1011cb0b54345 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Sat, 3 Dec 2016 15:59:05 +0000 Subject: bash_test: handle race condition. Other tests may delete Bash files (e.g. `shcmd.sh`) while tests are ongoing so ensure this doesn't cause a test failure. --- Library/Homebrew/test/bash_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'Library') diff --git a/Library/Homebrew/test/bash_test.rb b/Library/Homebrew/test/bash_test.rb index ff418c787..671ab5ec8 100644 --- a/Library/Homebrew/test/bash_test.rb +++ b/Library/Homebrew/test/bash_test.rb @@ -2,6 +2,7 @@ require "testing_env" class BashTests < Homebrew::TestCase def assert_valid_bash_syntax(file) + return unless file.exist? output = Utils.popen_read("/bin/bash -n #{file} 2>&1") assert $?.success?, output end -- cgit v1.2.3