aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-12-03 15:59:05 +0000
committerMike McQuaid2016-12-03 15:59:05 +0000
commit3f6d31dee1ab2ef84185899caca1011cb0b54345 (patch)
tree865d2a22a68ec3c29b3e8f90361c4279bafca068 /Library
parentbc9d3afd6ed0da795148c8f31fc1d8e5167eed35 (diff)
downloadbrew-3f6d31dee1ab2ef84185899caca1011cb0b54345.tar.bz2
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.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/bash_test.rb1
1 files changed, 1 insertions, 0 deletions
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